From: Eli Zaretskii <eliz@gnu.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Use search path for scripts
Date: Fri, 18 Nov 2005 14:53:00 -0000 [thread overview]
Message-ID: <usltu3vvo.fsf@gnu.org> (raw)
In-Reply-To: <437DC94B.7060601@st.com> (message from Andrew STUBBS on Fri, 18 Nov 2005 12:30:03 +0000)
> Date: Fri, 18 Nov 2005 12:30:03 +0000
> From: Andrew STUBBS <andrew.stubbs@st.com>
> Cc: gdb-patches@sources.redhat.com
>
> Fair enough. As you say, I can probably solve this part of the problem a
> different way, or else just keep a (much smaller) local patch.
>
> Here is the patch adjusted as you request.
This is fine with me, thanks.
> - stream = fopen (file, FOPEN_RT);
> - if (!stream)
> + /* Search for and open 'file' on the search path used for source
> + files. Put the full location in 'full_pathname'. */
> + fd = openp (source_path, OPF_TRY_CWD_FIRST,
> + file, O_RDONLY, 0, &full_pathname);
> +
> + /* Use the full path name, if it is found. */
> + if (full_pathname != NULL && fd != -1)
> + {
> + file = full_pathname;
> + }
> +
> + if (fd == -1)
> {
> source_verbose = old_source_verbose;
> if (from_tty)
> @@ -496,6 +510,7 @@ source_command (char *args, int from_tty
> return;
> }
>
> + stream = fdopen (fd, "r");
^^^
Shouldn't this be FOPEN_RT, like what was used in the call to fopen in
the original code?
next prev parent reply other threads:[~2005-11-18 13:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 19:36 Andrew STUBBS
2005-11-17 0:04 ` Eli Zaretskii
2005-11-17 12:41 ` Andrew STUBBS
2005-11-17 19:42 ` Eli Zaretskii
2005-11-18 13:23 ` Andrew STUBBS
2005-11-18 14:53 ` Eli Zaretskii [this message]
2005-11-18 15:54 ` Andrew STUBBS
2005-11-25 18:02 ` Andrew STUBBS
2005-11-25 18:12 ` Daniel Jacobowitz
2005-11-25 18:33 ` Andrew STUBBS
2005-11-25 18:39 ` Daniel Jacobowitz
2005-11-25 20:12 ` Andrew STUBBS
2005-11-25 21:26 ` Daniel Jacobowitz
2005-11-25 22:33 ` Eli Zaretskii
2005-11-28 19:34 ` Andrew STUBBS
2005-11-25 21:56 ` Eli Zaretskii
2005-11-25 21:43 ` Eli Zaretskii
2006-01-12 0:09 ` Andrew STUBBS
2006-01-22 20:40 ` Daniel Jacobowitz
2006-01-23 16:29 ` Andrew STUBBS
2006-01-23 17:41 ` Andrew STUBBS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=usltu3vvo.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=andrew.stubbs@st.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox