[PATCH] Cygwin: Avoid implicit declaration warnings

This is a discussion on [PATCH] Cygwin: Avoid implicit declaration warnings within the OpenSSH Development forums, part of the Networking and Network Related category; Hi, I have left this slip through already too long. When compiling openbsd-compat/bsd-cygwin_util.c, the following warnings ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-01-2006
Corinna Vinschen
 
Posts: n/a
Default [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
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/lis...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0