about summary refs log tree commit diff
path: root/posix/getopt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-29 20:20:00 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-29 20:20:00 +0000
commit1e489af957dbf19c5080dc86c0a80ba6a47d009f (patch)
tree89dad8c1064f6e2d39b3cd6451d8ec3117de3405 /posix/getopt.c
parent1d20f7f83495af86d393d97620a89f48a3163291 (diff)
downloadglibc-1e489af957dbf19c5080dc86c0a80ba6a47d009f.tar.gz
glibc-1e489af957dbf19c5080dc86c0a80ba6a47d009f.tar.xz
glibc-1e489af957dbf19c5080dc86c0a80ba6a47d009f.zip
* posix/getopt.c (_getopt_internal_r): Remove old POSIX-demanded
	error message.  POSIX today does not require the messages to be in
	a specific form.  Suggested by Jim Meyering <jim@meyering.net>.
Diffstat (limited to 'posix/getopt.c')
-rw-r--r--posix/getopt.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/posix/getopt.c b/posix/getopt.c
index 103f572b07..965bfdd3ac 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -792,30 +792,16 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 	if (print_errors)
 	  {
 #if defined _LIBC && defined USE_IN_LIBIO
-	      char *buf;
-	      int n;
+	    char *buf;
+	    int n;
 #endif
 
-	    if (d->__posixly_correct)
-	      {
-#if defined _LIBC && defined USE_IN_LIBIO
-		n = __asprintf (&buf, _("%s: illegal option -- '%c'\n"),
-				argv[0], c);
-#else
-		fprintf (stderr, _("%s: illegal option -- '%c'\n"), argv[0],
-			 c);
-#endif
-	      }
-	    else
-	      {
 #if defined _LIBC && defined USE_IN_LIBIO
-		n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
-				argv[0], c);
+	    n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
+			    argv[0], c);
 #else
-		fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0],
-			 c);
+	    fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
 #endif
-	      }
 
 #if defined _LIBC && defined USE_IN_LIBIO
 	    if (n >= 0)