summaryrefslogtreecommitdiff
path: root/libc/regexp/regerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/regexp/regerror.c')
-rw-r--r--libc/regexp/regerror.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libc/regexp/regerror.c b/libc/regexp/regerror.c
new file mode 100644
index 0000000..63864c7
--- /dev/null
+++ b/libc/regexp/regerror.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+void
+regerror(s)
+char *s;
+{
+#ifdef ERRAVAIL
+ error("regexp: %s", s);
+#else
+ fprintf(stderr, "regexp(3): %s", s);
+ exit(1);
+#endif
+ /* NOTREACHED */
+}