[PATCH] avoid including getopt.h twice for cygwin
Christopher Faylor
cgf@redhat.com
Sat Mar 8 04:58:00 GMT 2003
2003-03-07 Christopher Faylor <cgf@redhat.com>
* libc/include/sys/unistd.h: Guard getopt.h call to force only
declaration of getopt and avoid getopt_long declaration.
* libc/sys/cygwin/include/unistd.h: Remove.
Index: libc/include/sys/unistd.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.39
diff -u -p -r1.39 unistd.h
--- libc/include/sys/unistd.h 24 Jan 2003 15:25:24 -0000 1.39
+++ libc/include/sys/unistd.h 8 Mar 2003 04:56:30 -0000
@@ -126,7 +126,9 @@ int _EXFUN(vhangup, (void ));
_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
#ifdef __CYGWIN__
+# define __UNISTD_GETOPT__
# include <getopt.h>
+# undef __UNISTD_GETOPT__
#else
extern char *optarg; /* getopt(3) external variables */
extern int optind, opterr, optopt;
More information about the Newlib
mailing list