+Wed Jun 10 14:06:05 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * configure.in: Add some tests for gnu-regex.c's benefit.
+ See if btowc() function is provided in C library.
+ * configure, config.in: Regenerated.
+ * Makefile.in (CLIBS, CDEPS): Add @LIBOBJS@ to build btowc.c
+ if necessary.
+ * btowc.c: New file.
+
+ * gnu-regex.c: Reorder wchar.h and wctype.h includes for Solaris'
+ benefit.
+ Drop namespace preserving defines for now.
+
Wed Jun 10 11:53:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gnu-regex.c: Include "gnu-regex.h", not "regex.h".
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
+/* Define if you have the bcopy function. */
+#undef HAVE_BCOPY
+
+/* Define if you have the btowc function. */
+#undef HAVE_BTOWC
+
+/* Define if you have the bzero function. */
+#undef HAVE_BZERO
+
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
+/* Define if you have the isascii function. */
+#undef HAVE_ISASCII
+
+/* Define if you have the memcpy function. */
+#undef HAVE_MEMCPY
+
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the <endian.h> header file. */
#undef HAVE_ENDIAN_H
+/* Define if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
+/* Define if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the <wctype.h> header file. */
+#undef HAVE_WCTYPE_H
+
/* Define if you have the dl library (-ldl). */
#undef HAVE_LIBDL
AC_TYPE_SIGNAL
AC_HEADER_STDC
-AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h)
+AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h libintl.h)
+AC_CHECK_HEADERS(wctype.h wchar.h, USE_WCHAR=yes, USE_WCHAR=no)
+dnl Solaris 2.5 don't define btowc() in the wchar.h
+if test "$USE_WCHAR" = "yes"; then
+ AC_REPLACE_FUNCS(btowc)
+fi
+
AC_HEADER_STAT
AC_C_CONST
-AC_CHECK_FUNCS(setpgid sbrk select poll sigaction)
+AC_CHECK_FUNCS(setpgid sbrk select poll sigaction isascii bzero bcopy memcpy)
AC_FUNC_ALLOCA
# If we are configured native on GNU/Linux, work around problems with sys/procfs.h
/* For platform which support the ISO C amendement 1 functionality we
support user defined character classes. */
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
-# include <wctype.h>
+ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
# include <wchar.h>
-
-/* We have to keep the namespace clean. */
-# define regfree(preg) __regfree (preg)
-# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
-# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
-# define regerror(errcode, preg, errbuf, errbuf_size) \
- __regerror(errcode, preg, errbuf, errbuf_size)
-# define re_set_registers(bu, re, nu, st, en) \
- __re_set_registers (bu, re, nu, st, en)
-# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
- __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
-# define re_match(bufp, string, size, pos, regs) \
- __re_match (bufp, string, size, pos, regs)
-# define re_search(bufp, string, size, startpos, range, regs) \
- __re_search (bufp, string, size, startpos, range, regs)
-# define re_compile_pattern(pattern, length, bufp) \
- __re_compile_pattern (pattern, length, bufp)
-# define re_set_syntax(syntax) __re_set_syntax (syntax)
-# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
- __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
-# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
-
-#define btowc __btowc
+# include <wctype.h>
#endif
/* This is for other GNU distributions with internationalized messages. */