about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile5
-rw-r--r--posix/regex.c4
-rw-r--r--posix/runptests.c3
3 files changed, 7 insertions, 5 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 5a37df6325..ad70fddd63 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -30,7 +30,7 @@ headers	:= sys/utsname.h sys/times.h sys/wait.h sys/types.h unistd.h	      \
 
 distribute := confstr.h TESTS TESTS2C.sed testcases.h \
 	      PTESTS PTESTS2C.sed ptestcases.h \
-	      globtest.c globtest.sh wordexp-tst.sh
+	      globtest.c globtest.sh wordexp-tst.sh annexc.c
 
 routines :=								      \
 	uname								      \
@@ -63,7 +63,8 @@ gpl2lgpl := getopt.c getopt1.c getopt.h	regex.c regex.h
 before-compile	:= testcases.h ptestcases.h
 
 # So they get cleaned up.
-generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10)
+generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
+	     $(objpfx)annexc $(objpfx)annexc.out
 
 include ../Rules
 
diff --git a/posix/regex.c b/posix/regex.c
index 26c876a155..3868da3eb7 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -5509,12 +5509,12 @@ re_comp (s)
     {
       re_comp_buf.buffer = (unsigned char *) malloc (200);
       if (re_comp_buf.buffer == NULL)
-        return gettext (re_error_msgid[(int) REG_ESPACE]);
+        return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
       re_comp_buf.allocated = 200;
 
       re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
       if (re_comp_buf.fastmap == NULL)
-	return gettext (re_error_msgid[(int) REG_ESPACE]);
+	return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
     }
 
   /* Since `re_exec' always passes NULL for the `regs' argument, we
diff --git a/posix/runptests.c b/posix/runptests.c
index 50b157b76f..b1eabb9ebd 100644
--- a/posix/runptests.c
+++ b/posix/runptests.c
@@ -21,6 +21,7 @@
 #include <sys/types.h>
 #include <regex.h>
 #include <stdio.h>
+#include <string.h>
 
 /* Data structure to describe the tests.  */
 struct test
@@ -108,7 +109,7 @@ main (int argc, char *argv[])
 	regfree (&re);
       }
 
-  printf ("\n%u tests, %d errors\n", cnt, errors);
+  printf ("\n%Zu tests, %d errors\n", cnt, errors);
 
   /* We should return here the error status but since some tests are known
      to fail this would only cause the libc testsuite to fail.  */