From 9828dc4e8fd7e2a91c3b82c6fa73d26f43e4df58 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 23 Aug 2005 20:37:24 +0000 Subject: [PATCH] * config/srclist.txt: Add glibc bug 1233. * lib/regex.h (REG_NOSYS) [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]: Define, since POSIX requires it as of 2001. (_REG_ENOSYS) [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]: New private symbol, used to keep the enum signed in all cases. --- config/ChangeLog | 2 +- config/srclist.txt | 3 ++- lib/ChangeLog | 5 +++++ lib/regex.h | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index 3ffe3ca0d7..fe364d592a 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,6 +1,6 @@ 2005-08-23 Paul Eggert - * srclist.txt: Add glibc bugs 1231, 1232. + * srclist.txt: Add glibc bugs 1231-1233. 2005-08-20 Paul Eggert diff --git a/config/srclist.txt b/config/srclist.txt index 76007a601a..5d64ea8114 100644 --- a/config/srclist.txt +++ b/config/srclist.txt @@ -1,4 +1,4 @@ -# $Id: srclist.txt,v 1.80 2005-08-23 19:11:46 eggert Exp $ +# $Id: srclist.txt,v 1.81 2005-08-23 20:37:24 eggert Exp $ # Files for which we are not the source. See ./srclistvars.sh for the # variable definitions. @@ -107,6 +107,7 @@ $LIBCSRC/posix/regex.c lib gpl # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1207 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1222 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1232 +# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1233 #$LIBCSRC/posix/regex.h lib gpl # # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1215 diff --git a/lib/ChangeLog b/lib/ChangeLog index 336b1f5808..b1c6ea8f6f 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,10 @@ 2005-08-23 Paul Eggert + * regex.h (REG_NOSYS) + [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]: + Define, since POSIX requires it as of 2001. + (_REG_ENOSYS) [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]: + New private symbol, used to keep the enum signed in all cases. * regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James Youngman in . diff --git a/lib/regex.h b/lib/regex.h index c31095aa2f..1885779361 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -309,8 +309,10 @@ extern reg_syntax_t re_syntax_options; `re_error_msg' table in regex.c. */ typedef enum { -#ifdef _XOPEN_SOURCE +#if defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE REG_ENOSYS = -1, /* This will never happen for this implementation. */ +#else + _REG_ENOSYS = -1, /* This is so that reg_errcode_t is always signed. */ #endif REG_NOERROR = 0, /* Success. */ -- 2.30.2