summaryrefslogtreecommitdiff
path: root/lib/regex.h
diff options
context:
space:
mode:
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. */