Magellan Linux

Contents of /trunk/coreutils/patches-5.3.0/coreutils-5.3.0-warning-userspec.c.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44 - (show annotations) (download)
Thu Oct 13 21:17:16 2005 UTC (18 years, 7 months ago) by niro
File size: 944 byte(s)
patch set for coretutils-5.3.0

1 diff -urN 3/lib/userspec.c 4/lib/userspec.c
2 --- 3/lib/userspec.c 2004-10-05 17:42:29.000000000 +0000
3 +++ 4/lib/userspec.c 2005-03-30 14:56:20.000000000 +0000
4 @@ -264,7 +264,7 @@
5 char const *error_msg =
6 parse_with_separator (spec, colon, uid, gid, username, groupname);
7
8 - if (!colon && error_msg)
9 + if (!colon && error_msg && (!getenv("POSIXLY_CORRECT") || posix2_version() < 200112))
10 {
11 /* If there's no colon but there is a dot, and if looking up the
12 whole spec failed (i.e., the spec is not a owner name that
13 @@ -273,6 +273,13 @@
14 the POSIX-required behavior is always tried first. */
15
16 char const *dot = strchr (spec, '.');
17 +
18 + if (dot)
19 + {
20 + if (! posix2_version() < 200112)
21 + error (0,0,_("`%s' syntax is obsolete; use `:' since this will be removed in future"), spec);
22 + }
23 +
24 if (dot
25 && ! parse_with_separator (spec, dot, uid, gid, username, groupname))
26 error_msg = NULL;