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 via email to