]> git.saurik.com Git - bison.git/commitdiff
(__GNU_LIBRARY__) [lint]: Define to work around
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Dec 2002 11:41:21 +0000 (11:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Dec 2002 11:41:21 +0000 (11:41 +0000)
problem with latest <getopt.h>.
(HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.

src/getargs.c

index de468e556d2ef3d856ccd9ae211de71a8d5e9761..23b06394b47c08cd0d1c9477efb1fd28a003bfe9 100644 (file)
 
 #include <argmatch.h>
 #include <error.h>
+
+/* Hack to get <getopt.h> to declare getopt with a prototype.  */
+#if lint && ! defined __GNU_LIBRARY__
+# define __GNU_LIBRARY__
+# define HACK_FOR___GNU_LIBRARY___PROTOTYPE 1
+#endif
+
 #include <getopt.h>
 
+#ifdef HACK_FOR___GNU_LIBRARY___PROTOTYPE
+# undef __GNU_LIBRARY__
+# undef HACK_FOR___GNU_LIBRARY___PROTOTYPE
+#endif
+
 #include "complain.h"
 #include "files.h"
 #include "getargs.h"