SOCKS function redefinitions need prototypes, too, otherwise
Jens Hamisch [Tue, 17 Oct 2000 08:39:36 +0000 (10:39 +0200)]
for example 32 bit versus 64 bit differences cause a lot of
problems.  Part of

Subject: [ID 20001016.017] [jens: 5.7.0 Solaris 8, 64 Bit, Workshop 6.0 Compiler]
Message-Id: <20001017083936.A11104@Strawberry.COM>

p4raw-id: //depot/perl@7378

doio.c
pp_sys.c

diff --git a/doio.c b/doio.c
index eba2f8c..87e53a4 100644 (file)
--- a/doio.c
+++ b/doio.c
 #if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
 # include <sys/socket.h>
 # if defined(USE_SOCKS) && defined(I_SOCKS)
+#   if !defined(INCLUDE_PROTOTYPES)
+#       define INCLUDE_PROTOTYPES /* for <socks.h> */
+#       define PERL_SOCKS_NEED_PROTOTYPES
+#   endif
 #   include <socks.h>
+#   ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */
+#       undef INCLUDE_PROTOTYPES
+#       undef PERL_SOCKS_NEED_PROTOTYPES
+#   endif 
 # endif 
 # ifdef I_NETBSD
 #  include <netdb.h>
index 9329ffd..c7cbd46 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -57,7 +57,15 @@ extern "C" int syscall(unsigned long,...);
 #if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
 # include <sys/socket.h>
 # if defined(USE_SOCKS) && defined(I_SOCKS)
+#   if !defined(INCLUDE_PROTOTYPES)
+#       define INCLUDE_PROTOTYPES /* for <socks.h> */
+#       define PERL_SOCKS_NEED_PROTOTYPES
+#   endif
 #   include <socks.h>
+#   ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */
+#       undef INCLUDE_PROTOTYPES
+#       undef PERL_SOCKS_NEED_PROTOTYPES
+#   endif 
 # endif
 # ifdef I_NETDB
 #  include <netdb.h>