Cleaned up some -Wall warnings under unix.
authorpatthoyts <patthoyts>
Fri, 13 Jun 2003 22:08:24 +0000 (22:08 +0000)
committerpatthoyts <patthoyts>
Fri, 13 Jun 2003 22:08:24 +0000 (22:08 +0000)
generic/udp_tcl.c
generic/udp_tcl.h

index 1caec16ed0d891ac21081a352d44438c9ff145d3..f2f7c3039b676133adfbf0dbb8c02e94b37c7c17 100644 (file)
@@ -417,12 +417,12 @@ udpPeek(ClientData clientData, Tcl_Interp *interp,
 {
 #ifndef WIN32
     int buffer_size = 16;
-    int actual_size, socksize, port;
+    int actual_size, socksize;
     int sock;
     char message[17];
-    char *remotehost;
-    struct hostent *name;
+    /*struct hostent *name;*/
 #ifdef SIPC_IPV6
+    char *remotehost;
     struct sockaddr_in6 recvaddr;
 #else
     struct sockaddr_in recvaddr;
index 8ebdf083b490d0effbdae8e6b68db3f0dc0d1bda..5f7265c61546b7b5d9b748977513428e52ee73ec 100644 (file)
 #define UDP_TCL_H
 
 #ifdef WIN32
-#include <winsock.h>
+#  include <winsock.h>
 #else
-#include <unistd.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <netdb.h>
+#  if HAVE_UNISTD_H
+#    include <unistd.h>
+#  endif
+#  if HAVE_STDLIB_H
+#    include <stdlib.h>
+#  endif
+#  if HAVE_SYS_TIME_H
+#    include <sys/time.h>
+#  endif
+#  include <sys/socket.h>
+#  include <netinet/in.h>
+#  include <arpa/inet.h>
+#  include <netdb.h>
 #endif
 
 #include <stdio.h>