Mercurial > hg > octave-kai > gnulib-hg
diff lib/findprog.c @ 10391:f0a681493fa6
New module 'xconcat-filename', split off from module 'concat-filename'.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 02 Sep 2008 01:34:21 +0200 (2008-09-01) |
parents | bbbbbf4cd1c5 |
children | dd1c6e77ee94 |
line wrap: on
line diff
--- a/lib/findprog.c +++ b/lib/findprog.c @@ -1,5 +1,5 @@ /* Locating a program in PATH. - Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ #include <unistd.h> #include "xalloc.h" -#include "filename.h" +#include "concat-filename.h" const char * @@ -75,7 +75,7 @@ dir = "."; /* Concatenate dir and progname. */ - progpathname = concatenated_filename (dir, progname, NULL); + progpathname = xconcatenated_filename (dir, progname, NULL); /* On systems which have the eaccess() system call, let's use it. On other systems, let's hope that this program is not installed @@ -88,7 +88,7 @@ { free (progpathname); - /* Add the "./" prefix for real, that concatenated_filename() + /* Add the "./" prefix for real, that xconcatenated_filename() optimized away. This avoids a second PATH search when the caller uses execlp/execvp. */ progpathname = XNMALLOC (2 + strlen (progname) + 1, char);