[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
regex.h REG_ENOSYS patch for POSIX and portability
From: |
Paul Eggert |
Subject: |
regex.h REG_ENOSYS patch for POSIX and portability |
Date: |
Tue, 23 Aug 2005 13:29:30 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
It looks like I spoke too soon and that we still have some regex
problems. Among other things, there seem to be several problems with
the POSIX name space restrictions in regex.h. To get the ball rolling
I installed this:
2005-08-23 Paul Eggert <address@hidden>
* 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/srclist.txt 23 Aug 2005 19:11:46 -0000 1.80
+++ config/srclist.txt 23 Aug 2005 20:19:48 -0000
@@ -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
--- lib/regex.h 23 Aug 2005 19:11:46 -0000 1.29
+++ lib/regex.h 23 Aug 2005 20:19:48 -0000
@@ -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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- regex.h REG_ENOSYS patch for POSIX and portability,
Paul Eggert <=