Wed 03 Aug 2005 03:05:37 PM UTC, original submission:
On cygwin, compilation of the fresh 4.2.24 tarball fails, because regextype doesn't define program_name, and doesn't link with the gettext library.
gcc -g2 -o regexprops.exe regexprops.o regextype.o ../gnulib/lib/libgnulib.a
regextype.o: In function `get_regex_type':
/home/eblake/findutils-4.2.24/lib/regextype.c:114: undefined reference to `_libintl_gettext'
../gnulib/lib/libgnulib.a(error.o): In function `error':
/home/eblake/findutils-4.2.24/gnulib/lib/error.c:214: undefined reference to `_program_name'
../gnulib/lib/libgnulib.a(error.o): In function `error_at_line':
/home/eblake/findutils-4.2.24/gnulib/lib/error.c:274: undefined reference to `_program_name'
../gnulib/lib/libgnulib.a(xalloc-die.o): In function `xalloc_die':
/home/eblake/findutils-4.2.24/gnulib/lib/xalloc-die.c:38: undefined reference to `_libintl_gettext'
../gnulib/lib/libgnulib.a(quotearg.o): In function `gettext_quote':
/home/eblake/findutils-4.2.24/gnulib/lib/quotearg.c:168: undefined reference to `_libintl_gettext'
collect2: ld returned 1 exit status
make[3]: *** [regexprops.exe] Error 1
This patch fixes the program_name complaint, but I'm not sure of the automake magic needed to fix regexprop's use of gettext to correctly pull in libintl.
Tue Jul 26 10:11:42 2005
--- lib/regexprops.c Wed Aug 3 08:57:09 2005
***************
--- 30,37 ----
#include "regex.h"
#include "regextype.h"
+ /* Name this program was run with. */
+ char *program_name;
static void output(const char *s, int escape)
{
- int main (int argc, char *argv[])
- 493,498 ****
--- 495,502 ----
{
const char *up = "";
+ program_name = argv[0];
+
if (argc > 1)
up = argv[1];
|