* 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 <string.h>. Don't include <regex.h>
twice.
2013-02-03 Paul Eggert <eggert@cs.ucla.edu>
+ 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 <string.h>. Don't include <regex.h>
+ 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
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT[
- #include <locale.h>
- #include <limits.h>
- #include <regex.h>
- #if HAVE_ALARM
- # include <unistd.h>
- # include <signal.h>
- #endif
- ]],
+ [[#include <regex.h>
+
+ #include <locale.h>
+ #include <limits.h>
+ #include <string.h>
+ #if HAVE_ALARM
+ # include <unistd.h>
+ # include <signal.h>
+ #endif
+ ]],
[[int result = 0;
static struct re_pattern_buffer regex;
unsigned char folded_chars[UCHAR_MAX + 1];
#include <locale.h>
#include <limits.h>
-#include <regex.h>
+#include <string.h>
#if HAVE_ALARM
# include <unistd.h>
# include <signal.h>