diff options
author | Jason Molenda <jmolenda@apple.com> | 1998-06-10 21:08:38 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1998-06-10 21:08:38 +0000 |
commit | 9ed669cf7671e30fc9ae982fd147905a78364ee7 (patch) | |
tree | 621bc22768a653396e1a31f61c3c5c15b0578661 | |
parent | a4122443afc9130bc65910974728b468b217d3c2 (diff) | |
download | gdb-9ed669cf7671e30fc9ae982fd147905a78364ee7.zip gdb-9ed669cf7671e30fc9ae982fd147905a78364ee7.tar.gz gdb-9ed669cf7671e30fc9ae982fd147905a78364ee7.tar.bz2 |
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.
-rw-r--r-- | gdb/.Sanitize | 1 | ||||
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/config.in | 24 | ||||
-rw-r--r-- | gdb/configure.in | 10 | ||||
-rw-r--r-- | gdb/gnu-regex.c | 26 |
5 files changed, 48 insertions, 26 deletions
diff --git a/gdb/.Sanitize b/gdb/.Sanitize index 163f702..4c150c2 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -158,6 +158,7 @@ bcache.h blockframe.c breakpoint.c breakpoint.h +btowc.c buildsym.c buildsym.h c-exp.y diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 97e77cc..d2c3e17 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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". diff --git a/gdb/config.in b/gdb/config.in index 3d7a94c..39a4bbb 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -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 diff --git a/gdb/configure.in b/gdb/configure.in index cb61339..93cc177 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -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 diff --git a/gdb/gnu-regex.c b/gdb/gnu-regex.c index 424f624..844d71d 100644 --- a/gdb/gnu-regex.c +++ b/gdb/gnu-regex.c @@ -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. */ |