]> granicus.if.org Git - php/commitdiff
Fix multicast.c not defining errno on Windows
authorGustavo Lopes <glopes@nebm.ist.utl.pt>
Thu, 31 Jan 2013 15:34:46 +0000 (16:34 +0100)
committerGustavo Lopes <glopes@nebm.ist.utl.pt>
Sat, 2 Feb 2013 15:38:09 +0000 (16:38 +0100)
Small cleanups in includes as well.

ext/sockets/multicast.c
ext/sockets/sockaddr_conv.h
ext/sockets/windows_common.h

index 5d29c9c5e265efb053fbb383c068fea1a310dc01..c6de3198e465825a55bb2a05944e3034a1b90ced 100644 (file)
 
 #include "php_network.h"
 #ifdef PHP_WIN32
-# include "win32/inet.h"
-# include <winsock2.h>
-# include <windows.h>
-# include <Ws2tcpip.h>
-# include <Ws2ipdef.h>
-# include "php_sockets.h"
-# include "win32/sockets.h"
-# define NTDDI_XP NTDDI_WINXP /* bug in SDK */
-# include <IPHlpApi.h>
-# undef NTDDI_XP
-# if _WIN32_WINNT >= 0x0600
-#  define HAVE_IF_NAMETOINDEX 1
-# endif
+# include "windows_common.h"
 #else
 #include <sys/socket.h>
 #include <sys/ioctl.h>
index 665c73913f108c0534dcb91ab754ff485e357fab..8e51edac8f874499857c2777b94b1c17211836fd 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef PHP_SOCKADR_CONV_H
 #define PHP_SOCKADR_CONV_H
 
-#define HAVE_SOCKETS 1
 #include <php_network.h>
 #include "php_sockets.h" /* php_socket */
 
index 1dc966ac0012717ba98a6294c5930d8684fb8876..c72c6987e68506f16c4fd45698d4cd72239b9dc2 100644 (file)
@@ -17,7 +17,9 @@
 #define WINDOWS_COMMON_H
 
 #include <Winsock2.h>
+#define NTDDI_XP NTDDI_WINXP /* bug in SDK */
 #include <IPHlpApi.h> /* conflicting definition of CMSG_DATA */
+#undef NTDDI_XP
 
 #define HAVE_IF_NAMETOINDEX 1