about summary refs log tree commit diff
path: root/misc/regexp.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc/regexp.h')
-rw-r--r--misc/regexp.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/misc/regexp.h b/misc/regexp.h
index 3fc0bc518c..346098945d 100644
--- a/misc/regexp.h
+++ b/misc/regexp.h
@@ -19,14 +19,17 @@
 #ifndef _REGEXP_H
 #define _REGEXP_H	1
 
-/* The contents of this header file was first standardized in X/Open
-   System Interface and Headers Issue 2, originally coming from SysV.
-   In issue 4, version 2, it is marked as TO BE WITDRAWN, and it has
-   been withdrawn in SUSv3.
+/* The contents of this header file were standardized in the
+   Single Unix Specification, Version 2 (1997) but marked as
+   LEGACY; new applications were already being encouraged to
+   use <regex.h> instead.  POSIX.1-2001 removed this header.
 
-   This code shouldn't be used in any newly written code.  It is
-   included only for compatibility reasons.  Use the POSIX definition
-   in <regex.h> for portable applications and a reasonable interface.  */
+   This header is provided only for backward compatibility.
+   It will be removed in the next release of the GNU C Library.
+   New code should use <regex.h> instead.  */
+
+#warning "<regexp.h> will be removed in the next release of the GNU C Library."
+#warning "Please update your code to use <regex.h> instead (no trailing 'p')."
 
 #include <features.h>
 #include <alloca.h>
@@ -182,19 +185,19 @@ compile (char *__restrict instring, char *__restrict expbuf,
       case REG_ERPAREN:
       default:
 	/* There is no matching error code.  */
-	RETURN (36);
+	ERROR (36);
       case REG_ESUBREG:
-	RETURN (25);
+	ERROR (25);
       case REG_EBRACK:
-	RETURN (49);
+	ERROR (49);
       case REG_EPAREN:
-	RETURN (42);
+	ERROR (42);
       case REG_EBRACE:
-	RETURN (44);
+	ERROR (44);
       case REG_BADBR:
-	RETURN (46);
+	ERROR (46);
       case REG_ERANGE:
-	RETURN (11);
+	ERROR (11);
       case REG_ESPACE:
       case REG_ESIZE:
 	ERROR (50);