com php-src: Fix multicast.c not defining errno on Windows: ext/sockets/multicast.c ext/sockets/sockaddr_conv.h ext/s ockets/windows_common.h
| From: | Gustavo André dos Santos Lopes | Date: | Sat, 02 Feb 2013 15:38:09 +0000 |
| Subject: | com php-src: Fix multicast.c not defining errno on Windows: ext/sockets/multicast.c ext/sockets/sockaddr_conv.h ext/s ockets/windows_common.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71116@lists.php.net to get a copy of this message | ||
Commit: e2fc17c833c5122327438c82fc0dc4b689268f59
Author: Gustavo Lopes <glopes@nebm.ist.utl.pt> Thu, 31 Jan 2013 16:34:46 +0100
Parents: 608254fa5757ee07999d5c4bec660b8c29780938
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2fc17c833c5122327438c82fc0dc4b689268f59
Log:
Fix multicast.c not defining errno on Windows
Small cleanups in includes as well.
Changed paths:
M ext/sockets/multicast.c
M ext/sockets/sockaddr_conv.h
M ext/sockets/windows_common.h
Diff:
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 5d29c9c..c6de319 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -28,19 +28,7 @@
#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>
diff --git a/ext/sockets/sockaddr_conv.h b/ext/sockets/sockaddr_conv.h
index 665c739..8e51eda 100644
--- a/ext/sockets/sockaddr_conv.h
+++ b/ext/sockets/sockaddr_conv.h
@@ -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 */
diff --git a/ext/sockets/windows_common.h b/ext/sockets/windows_common.h
index 1dc966a..c72c698 100644
--- a/ext/sockets/windows_common.h
+++ b/ext/sockets/windows_common.h
@@ -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