(error_tail): Don't cast alloca to (void *); it's already (void *).
[gnulib.git] / lib / userspec.c
index 80ace3e..6e58b48 100644 (file)
 #endif
 
 #include <limits.h>
-
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef strchr
-#  define strchr index
-# endif
-#endif
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 
+#include "posixver.h"
 #include "xalloc.h"
 #include "xstrtol.h"
 
@@ -179,7 +169,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
   separator = strchr (spec, ':');
 
   /* If there is no colon, then see if there's a `.'.  */
-  if (separator == NULL)
+  if (separator == NULL && posix2_version () < 200112)
     {
       dot = strchr (spec, '.');
       /* If there's no colon but there is a `.', then first look up the