From 01d615435c88d73c50ea0818544633a20c6db232 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 8 Mar 2003 04:57:41 +0000 Subject: [PATCH] * 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. --- newlib/ChangeLog | 6 ++++++ newlib/libc/include/sys/unistd.h | 2 ++ newlib/libc/sys/cygwin/include/unistd.h | 11 ----------- 3 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 newlib/libc/sys/cygwin/include/unistd.h diff --git a/newlib/ChangeLog b/newlib/ChangeLog index ba0adba64..e9c789176 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2003-03-07 Christopher Faylor + + * 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. + 2003-03-07 Corinna Vinschen * configure.host: Define stdio64_dir for Cygwin. diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 270be89aa..8879ee67d 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -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 +# undef __UNISTD_GETOPT__ #else extern char *optarg; /* getopt(3) external variables */ extern int optind, opterr, optopt; diff --git a/newlib/libc/sys/cygwin/include/unistd.h b/newlib/libc/sys/cygwin/include/unistd.h deleted file mode 100644 index 9818176b9..000000000 --- a/newlib/libc/sys/cygwin/include/unistd.h +++ /dev/null @@ -1,11 +0,0 @@ -/* unistd.h for Cygwin. */ - -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -# include -# define __UNISTD_GETOPT__ -# include -# undef __UNISTD_GETOPT__ - -#endif /* _UNISTD_H_ */