# HG changeset patch # User Paul Eggert # Date 1359911946 28800 # Node ID a9f418d6d6766d407f6ab45d018e35d105204f5b # Parent 219f5e131f8ddd5fa697c6c6ae97c33056206faa regex-tests, regex: fix bug: memset undeclared * tests/test-regex.c: Don't include regex.h twice. Include string.h, to declare memset. Christensen's report also mentioned this issue. * m4/regex.m4 (gl_REGEX): Keep test program more in sync with test-regex.c, to avoid future problems like this. Remove AC_INCLUDES_DEFAULT. Include . Don't include twice. diff -r 219f5e131f8d -r a9f418d6d676 ChangeLog --- a/ChangeLog Sun Feb 03 09:03:51 2013 -0800 +++ b/ChangeLog Sun Feb 03 09:19:06 2013 -0800 @@ -1,5 +1,14 @@ 2013-02-03 Paul Eggert + regex-tests, regex: fix bug: memset undeclared + * tests/test-regex.c: Don't include regex.h twice. Include + string.h, to declare memset. Christensen's report also mentioned + this issue. + * m4/regex.m4 (gl_REGEX): Keep test program more in sync with + test-regex.c, to avoid future problems like this. Remove + AC_INCLUDES_DEFAULT. Include . Don't include + twice. + regex-tests: fix link errors on older Solaris These need to link with @LIBINTL@ to get libintl_gettext. Problem reported by Tom G. Christensen in diff -r 219f5e131f8d -r a9f418d6d676 m4/regex.m4 --- a/m4/regex.m4 Sun Feb 03 09:03:51 2013 -0800 +++ b/m4/regex.m4 Sun Feb 03 09:19:06 2013 -0800 @@ -32,15 +32,16 @@ [gl_cv_func_re_compile_pattern_working], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT[ - #include - #include - #include - #if HAVE_ALARM - # include - # include - #endif - ]], + [[#include + + #include + #include + #include + #if HAVE_ALARM + # include + # include + #endif + ]], [[int result = 0; static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; diff -r 219f5e131f8d -r a9f418d6d676 tests/test-regex.c --- a/tests/test-regex.c Sun Feb 03 09:03:51 2013 -0800 +++ b/tests/test-regex.c Sun Feb 03 09:19:06 2013 -0800 @@ -20,7 +20,7 @@ #include #include -#include +#include #if HAVE_ALARM # include # include