From: Jim Meyering Date: Wed, 16 Jan 2002 22:59:14 +0000 (+0000) Subject: Add support for POSIX 1003.1-2001, which requires removal for X-Git-Tag: TEXTUTILS-2_0_20~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5b50f46ea670872dfe0b6fdd8b66a1544497c20;p=thirdparty%2Fcoreutils.git Add support for POSIX 1003.1-2001, which requires removal for support of obsolete "+" option syntax in sort, tail, and uniq. (usage, main): Implement this. --- diff --git a/src/uniq.c b/src/uniq.c index 4fa334174b..0690a1eea1 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -158,7 +158,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (_("\ -w, --check-chars=N compare no more than N characters in lines\n\ -N same as -f N\n\ - +N same as -s N (obsolescent; will be withdrawn)\n\ +"), stdout); + if (POSIX2_VERSION < 200112) + fputs (_("\ + +N same as -s N (obsolete; will be withdrawn)\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); @@ -436,7 +439,8 @@ main (int argc, char **argv) case 1: { unsigned long int size; - if (optarg[0] == '+' + if (POSIX2_VERSION < 200112 + && optarg[0] == '+' && xstrtoul (optarg, NULL, 10, &size, "") == LONGINT_OK && size <= SIZE_MAX) skip_chars = size;