Merge argmatch cleanups from Bison. Assume C89.
authorJim Meyering <jim@meyering.net>
Thu, 21 Nov 2002 09:24:43 +0000 (09:24 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 21 Nov 2002 09:24:43 +0000 (09:24 +0000)
Include config.h here, not in argmatch.h.
Include stdlib.h, for EXIT_FAILURE.
Always include <string.h>, since we assume C89.
(EXIT_FAILURE): Remove pre-C89 bug workaround.

lib/argmatch.c

index 005be881f21b4c0aa67c958b9bd82e2a2c28ec70..746365840a61ee646ca791708f0b05b7e5fc7a02 100644 (file)
 /* Written by David MacKenzie <djm@ai.mit.edu>
    Modified by Akim Demaille <demaille@inf.enst.fr> */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "argmatch.h"
 
 #include <stdio.h>
-#ifdef STDC_HEADERS
-# include <string.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 
 #if HAVE_LOCALE_H
 # include <locale.h>
 # define ARGMATCH_QUOTING_STYLE locale_quoting_style
 #endif
 
-/* The following test is to work around the gross typo in
-   systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
-   is defined to 0, not 1.  */
-#if !EXIT_FAILURE
-# undef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
 /* Non failing version of argmatch call this function after failing. */
 #ifndef ARGMATCH_DIE
 # define ARGMATCH_DIE exit (EXIT_FAILURE)