[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getargs.c assumes EOF == -1
From: |
Paul Eggert |
Subject: |
getargs.c assumes EOF == -1 |
Date: |
Thu, 12 Dec 2002 23:56:40 -0800 (PST) |
I installed this portability patch. EOF is not guaranteed to equal -1
by the C Standard; it might be some other negative number.
2002-12-12 Paul Eggert <address@hidden>
* src/getargs.c (getargs): Don't assume EOF == -1.
Index: src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.51
diff -p -u -r1.51 getargs.c
--- src/getargs.c 11 Dec 2002 06:30:36 -0000 1.51
+++ src/getargs.c 13 Dec 2002 04:38:56 -0000
@@ -320,7 +320,8 @@ getargs (int argc, char *argv[])
{
int c;
- while ((c = getopt_long (argc, argv, short_options, long_options, NULL)) !=
EOF)
+ while ((c = getopt_long (argc, argv, short_options, long_options, NULL))
+ != -1)
switch (c)
{
case 0:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- getargs.c assumes EOF == -1,
Paul Eggert <=