Corinna Vinschen
2006-Sep-01 09:10 UTC
[PATCH] Cygwin: Avoid implicit declaration warnings
Hi, I have left this slip through already too long. When compiling openbsd-compat/bsd-cygwin_util.c, the following warnings appear: openbsd-compat/bsd-cygwin_util.c: In function `binary_open': openbsd-compat/bsd-cygwin_util.c:67: warning: implicit declaration of function `open' openbsd-compat/bsd-cygwin_util.c: In function `binary_pipe': openbsd-compat/bsd-cygwin_util.c:73: warning: implicit declaration of function `pipe' The below patch fixes that. Index: openbsd-compat/bsd-cygwin_util.c ==================================================================RCS file: /cvs/openssh/openbsd-compat/bsd-cygwin_util.c,v retrieving revision 1.18 diff -p -u -r1.18 bsd-cygwin_util.c --- openbsd-compat/bsd-cygwin_util.c 5 Aug 2006 09:08:17 -0000 1.18 +++ openbsd-compat/bsd-cygwin_util.c 1 Sep 2006 08:42:22 -0000 @@ -31,6 +31,13 @@ #ifdef HAVE_CYGWIN +#if defined(open) && open == binary_open +# undef open +#endif +#if defined(pipe) && open == binary_pipe +# undef pipe +#endif + #include <sys/types.h> #include <sys/stat.h> #include <sys/utsname.h> @@ -47,13 +54,6 @@ #define ntsec_on(c) ((c) && strstr((c),"ntsec") && !strstr((c),"nontsec")) #define ntsec_off(c) ((c) && strstr((c),"nontsec")) #define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea")) - -#if defined(open) && open == binary_open -# undef open -#endif -#if defined(pipe) && open == binary_pipe -# undef pipe -#endif int binary_open(const char *filename, int flags, ...) Thanks, Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat
Reasonably Related Threads
- [PATCH]: Match Cygwin version check to reality
- [PATCH] Two Cygwin related patches
- [PATCH]: Cygwin: Allow sshd to switch user context without password
- [PATCH] bsd-cygwin_util.c: Relax pubkey authentication prerequisites
- [PATCH]: Allow SSHD to install as service under WIndows 9x/Me