* posix/regex.c: Undefine ISASCII and ISPRINT before defining for
	Solaris' sake.
This commit is contained in:
Ulrich Drepper 1998-03-24 21:38:35 +00:00
parent 09515d674a
commit 0669867278
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,8 @@
1998-03-24 Ulrich Drepper <drepper@cygnus.com> 1998-03-24 Ulrich Drepper <drepper@cygnus.com>
* posix/regex.c: Undefine ISASCII and ISPRINT before defining for
Solaris' sake.
* posix/regex.c (regex_compile): Don't allow non-alphabet * posix/regex.c (regex_compile): Don't allow non-alphabet
characters in character set name. characters in character set name.

View File

@ -189,8 +189,10 @@ init_syntax_once ()
STDC_HEADERS is defined, then autoconf has verified that the ctype STDC_HEADERS is defined, then autoconf has verified that the ctype
macros don't need to be guarded with references to isascii. ... macros don't need to be guarded with references to isascii. ...
Defining isascii to 1 should let any compiler worth its salt Defining isascii to 1 should let any compiler worth its salt
eliminate the && through constant folding." */ eliminate the && through constant folding."
Solaris defines some of these symbols so we must undefine them first. */
#undef ISASCII
#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII) #if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
# define ISASCII(c) 1 # define ISASCII(c) 1
#else #else
@ -208,6 +210,7 @@ init_syntax_once ()
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c)) # define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
#endif #endif
#undef ISPRINT
#define ISPRINT(c) (ISASCII (c) && isprint (c)) #define ISPRINT(c) (ISASCII (c) && isprint (c))
#define ISDIGIT(c) (ISASCII (c) && isdigit (c)) #define ISDIGIT(c) (ISASCII (c) && isdigit (c))
#define ISALNUM(c) (ISASCII (c) && isalnum (c)) #define ISALNUM(c) (ISASCII (c) && isalnum (c))