* modules/findprog-lgpl (Makefile.am): Arrange to compile
findprog-lgpl.c, not findprog.c.
* lib/findprog.c (find_in_path): Add LGPLed replacement code for
XNMALLOC.
+2020-05-16 Bruno Haible <bruno@clisp.org>
+
+ findprog-lgpl: Fix link error (existing since 2008-09-02).
+ * modules/findprog-lgpl (Makefile.am): Arrange to compile
+ findprog-lgpl.c, not findprog.c.
+ * lib/findprog.c (find_in_path): Add LGPLed replacement code for
+ XNMALLOC.
+
2020-05-15 Paul Eggert <eggert@cs.ucla.edu>
c-stack: pacify -Wunused-result when DEBUG
/* Add the "./" prefix for real, that xconcatenated_filename()
optimized away. This avoids a second PATH search when the
caller uses execlp/execvp. */
+# if !IN_FINDPROG_LGPL
progpathname = XNMALLOC (2 + strlen (progname) + 1, char);
+# else
+ progpathname = (char *) malloc (2 + strlen (progname) + 1);
+ if (progpathname == NULL)
+ {
+ /* Out of memory. */
+ free (path);
+ return progname;
+ }
+# endif
progpathname[0] = '.';
progpathname[1] = '/';
memcpy (progpathname + 2, progname, strlen (progname) + 1);
gl_MODULE_INDICATOR([findprog-lgpl])
Makefile.am:
-lib_SOURCES += findprog.h findprog.c
+lib_SOURCES += findprog.h findprog-lgpl.c
Include:
"findprog.h"