[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Exclude optimization
From: |
Bruno Haible |
Subject: |
Re: [PATCH] Exclude optimization |
Date: |
Tue, 11 Aug 2009 16:36:55 +0200 |
User-agent: |
KMail/1.9.9 |
Sergey Poznyakoff wrote:
> +test_exclude_LDADD = $(LDADD)
You need
test_exclude_LDADD = $(LDADD) @LIBINTL@
otherwise on non-glibc systems you get a link error, like this:
gcc -g -O2 -L/usr/local/cygwin/lib -o test-exclude.exe test-exclude.o
../gllib/libgnu.a
../gllib/libgnu.a(argmatch.o): In function `argmatch_invalid':
/home/bruno/testdir8/gllib/argmatch.c:132: undefined reference to
`_libintl_gettext'
../gllib/libgnu.a(argmatch.o): In function `argmatch_valid':
/home/bruno/testdir8/gllib/argmatch.c:153: undefined reference to
`_libintl_gettext'
../gllib/libgnu.a(error.o): In function `error_tail':
/home/bruno/testdir8/gllib/error.c:127: undefined reference to
`_libintl_gettext'
../gllib/libgnu.a(quotearg.o): In function `gettext_quote':
/home/bruno/testdir8/gllib/quotearg.c:165: undefined reference to
`_libintl_gettext'
../gllib/libgnu.a(xalloc-die.o): In function `xalloc_die':
/home/bruno/testdir8/gllib/xalloc-die.c:34: undefined reference to
`_libintl_gettext'
collect2: ld returned 1 exit status
make[4]: *** [test-exclude.exe] Error 1
> +++ b/tests/test-exclude.c
> @@ -0,0 +1,119 @@
> +#if HAVE_STRING_H
> +# include <string.h>
> +#endif
You can assume the existence of <string.h> nowadays. No need to check
whether <string.h> exists.
> +#if HAVE_STRINGS_H
> +# include <strings.h>
> +#endif
This is not needed: The test does not use strcasecmp or strncasecmp.
> +#ifndef FNM_EXTMATCH
> +# define FNM_EXTMATCH 0
> +#endif
Not needed either: The identifier FNM_EXTMATCH is not used by the test
(should it?).
> +++ b/tests/test-exclude1.sh
> @@ -0,0 +1,42 @@
> +TMP=excltmp
> +LIST=flist
These file names are the same for several tests. Someone using
"make -j 2 check" will likely see test failures when the tests are
being run in parallel. The fix is to embed the test's number in the names
of the files being created.
> +++ b/tests/test-exclude2.sh
> +ERR=0
Why do test-exclude[2345].sh set ERR=0 at the beginning, while
test-exclude[167].sh don't?
- [PATCH] Exclude optimization, Sergey Poznyakoff, 2009/08/09
- Re: [PATCH] Exclude optimization, Bruno Haible, 2009/08/09
- Re: [PATCH] Exclude optimization, Sergey Poznyakoff, 2009/08/11
- Re: [PATCH] Exclude optimization, Ralf Wildenhues, 2009/08/11
- Re: [PATCH] Exclude optimization, Sergey Poznyakoff, 2009/08/11
- Re: [PATCH] Exclude optimization, Sergey Poznyakoff, 2009/08/11
- Re: [PATCH] Exclude optimization, Ralf Wildenhues, 2009/08/13
Re: [PATCH] Exclude optimization, Ralf Wildenhues, 2009/08/10