summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-07-10 20:43:42 +0000
committerJim Meyering <jim@meyering.net>2003-07-10 20:43:42 +0000
commit5b9ea05b6a5e4997ea5ca5f3138ecc8902d842c9 (patch)
treea1d21247439333c0db90d26de30adcf9f7fb893e /lib
parentc9ed2d4e4b071f445dec2f2ad2d32d38b388e2eb (diff)
downloadcoreutils-5b9ea05b6a5e4997ea5ca5f3138ecc8902d842c9.tar.xz
Include "posixver.h".
(parse_user_spec): Accept `.' as a separator only in pre-POSIX-200112 mode.
Diffstat (limited to 'lib')
-rw-r--r--lib/userspec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/userspec.c b/lib/userspec.c
index 80ace3e23..19443ec91 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -51,6 +51,7 @@
# include <unistd.h>
#endif
+#include "posixver.h"
#include "xalloc.h"
#include "xstrtol.h"
@@ -179,7 +180,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