This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] avoid including getopt.h twice for cygwin


2003-03-07  Christopher Faylor  <cgf at redhat dot 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]