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.


Mods based on the modifications used in GNU grep 2.2 to make gnu-regex.c
compile on other OSes.
This commit is contained in:
Jason Molenda 1998-06-10 21:08:38 +00:00
parent a4122443af
commit 9ed669cf76
5 changed files with 48 additions and 26 deletions

View file

@ -158,6 +158,7 @@ bcache.h
blockframe.c
breakpoint.c
breakpoint.h
btowc.c
buildsym.c
buildsym.h
c-exp.y

View file

@ -1,3 +1,16 @@
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".

View file

@ -136,6 +136,15 @@
/* 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
@ -145,6 +154,12 @@
/* 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
@ -187,6 +202,9 @@
/* 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
@ -241,6 +259,12 @@
/* 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

View file

@ -68,12 +68,18 @@ AC_ARG_PROGRAM
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

View file

@ -51,31 +51,9 @@
/* 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. */