2012-03-10 Paul Eggert <eggert@cs.ucla.edu>
+ regex: allow inclusion of <regex.h> before <limits.h>
+ Without this patch, portable programs had to include <limits.h> before
+ <regex.h> if they wanted a consistent value for RE_DUP_MAX.
+ I ran into this problem with a test version of GNU grep on Solaris 8.
+ * lib/regex.h: Include <limits.h> if _REGEX_INCLUDE_LIMITS_H.
+ This is done conditionally so that this change can be merged
+ back to glibc.
+ * m4/regex.m4 (gl_REGEX): Define _REGEX_INCLUDE_LIMITS_H if
+ using the included regex.
+
fts: depend on fdopendir
* modules/fts (Depends-on): Depend on fdopendir. This is needed
on Solaris 8, at least, since it lacks fdopendir. Evidently the
/* Maximum number of duplicates an interval can allow. POSIX-conforming
systems might define this in <limits.h>, but we want our
value, so remove any previous define. */
+# ifdef _REGEX_INCLUDE_LIMITS_H
+# include <limits.h>
+# endif
# ifdef RE_DUP_MAX
# undef RE_DUP_MAX
# endif
-# serial 60
+# serial 61
# Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc.
#
esac
if test $ac_use_included_regex = yes; then
+ AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1],
+ [Define if you want <regex.h> to include <limits.h>, so that it
+ consistently overrides <limits.h>'s RE_DUP_MAX.])
AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
[Define if you want regoff_t to be at least as wide POSIX requires.])
AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],