bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Smith <psmith@gnu.org>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: [PATCH] findprog: Support searching in a specified path string
Date: Tue, 10 Sep 2019 09:18:34 -0400	[thread overview]
Message-ID: <0a138dd42c6e97a91ecf796a9caeb660fcf6c568.camel@gnu.org> (raw)
In-Reply-To: <1732878.iGPO0ghJVr@omega>

On Mon, 2019-09-09 at 20:54 +0200, Bruno Haible wrote:
> -extern const char *find_in_given_path (const char *progname, const char *path);
> +   - Otherwise, it returns NULL.
> +   If OPTIMIZE_FOR_EXEC is true, the function saves some work, under the
> +   assumption that the resulting pathname will not be accessed directly,
> +   only through execl/execv or execlp/execvp.  */
> +extern const char *find_in_given_path (const char *progname, const char *path,
> +                                       bool optimize_for_exec);

Urk.  I just pushed some code to the GNU make repo using the previous
signature of this function... I guess that won't work for anyone
anymore :).  I'll fix this in a few days.

I actually don't see any need for this optimization, especially
compared to the added complexity of the API and docs: the suffix check
needs to be done somewhere after all.  I cannot believe it makes any
material difference whether it's done here versus by the OS--note that
on Windows, which is the only place this matters, so far,  IIRC it is
illegal to use "prog.exe.exe" so if an extension is already provided
the system won't search again, if that's the concern.

But I can adjust my code to match.

Cheers!



  reply	other threads:[~2019-09-10 13:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 23:10 [PATCH] findprog: Support searching in a specified path string Paul Smith
2019-09-06 23:21 ` Paul Smith
2019-09-07 10:42 ` Bruno Haible
2019-09-07 13:17   ` Paul Smith
2019-09-08 11:38     ` Bruno Haible
2019-09-08 14:03       ` Paul Smith
2019-09-08 14:59         ` Bruno Haible
2019-09-08 16:25           ` Bruno Haible
2019-09-08 17:34           ` Paul Smith
2019-09-08 17:48             ` Bruno Haible
2019-09-08 17:59               ` Paul Smith
2019-09-09 18:54                 ` Bruno Haible
2019-09-10 13:18                   ` Paul Smith [this message]
2019-09-14 11:20                     ` Bruno Haible

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a138dd42c6e97a91ecf796a9caeb660fcf6c568.camel@gnu.org \
    --to=psmith@gnu.org \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).