summaryrefslogtreecommitdiff
path: root/lib/regex.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-08-23 20:37:24 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-08-23 20:37:24 +0000
commit9828dc4e8fd7e2a91c3b82c6fa73d26f43e4df58 (patch)
tree2ed493e0a58e01d9ac234a952592e60b50fa3223 /lib/regex.h
parentb5fb70042633a9d83409be29d76057295c6614e7 (diff)
downloadgnulib-9828dc4e8fd7e2a91c3b82c6fa73d26f43e4df58.tar.gz
* 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.
Diffstat (limited to 'lib/regex.h')
-rw-r--r--lib/regex.h4
1 files changed, 3 insertions, 1 deletions
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. */