From 1e9db80d7264911fa4089cb7e4b3dc7f97b19c6e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 20 May 2020 19:35:39 +0200 Subject: Tweak some macro definition on Windows Closes GH-5606 --- ext/standard/filestat.c | 6 +----- ext/standard/link.c | 6 +----- ext/standard/pageinfo.c | 6 +----- win32/build/config.w32 | 1 - win32/build/config.w32.h.in | 2 ++ win32/grp.h | 27 --------------------------- 6 files changed, 5 insertions(+), 43 deletions(-) delete mode 100644 win32/grp.h diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 3e431c744d..61546c3da6 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -59,11 +59,7 @@ #endif #if HAVE_GRP_H -# ifdef PHP_WIN32 -# include "win32/grp.h" -# else -# include -# endif +# include #endif #if HAVE_UTIME diff --git a/ext/standard/link.c b/ext/standard/link.c index 002f9576eb..86ad6707c3 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -40,11 +40,7 @@ #endif #endif #if HAVE_GRP_H -#ifdef PHP_WIN32 -#include "win32/grp.h" -#else -#include -#endif +# include #endif #include #include diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 56e5462f3c..798f7cdbb3 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -28,11 +28,7 @@ #endif #endif #if HAVE_GRP_H -# ifdef PHP_WIN32 -# include "win32/grp.h" -# else -# include -# endif +# include #endif #ifdef PHP_WIN32 #undef getgid diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 7eb6593aca..a7d60812bd 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -293,7 +293,6 @@ if (main_network_has_ipv6) { AC_DEFINE('HAVE_GAI_STRERROR', 1); AC_DEFINE('HAVE_IPV6', 1); } -AC_DEFINE('HAVE_GETADDRINFO', main_network_has_ipv6); /* this allows up to 256 sockets to be select()ed in a single * call to select(), instead of the usual 64 */ diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 2167b1297b..ce4b71282e 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -135,3 +135,5 @@ #ifdef __clang__ #define HAVE_FUNC_ATTRIBUTE_TARGET 1 #endif + +#define HAVE_GETADDRINFO 1 diff --git a/win32/grp.h b/win32/grp.h deleted file mode 100644 index f8cc8fe206..0000000000 --- a/win32/grp.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Sterling Hughes | - +----------------------------------------------------------------------+ -*/ - -#ifndef PHP_WIN32_GRP_H -#define PHP_WIN32_GRP_H - -struct group { - char *gr_name; - char *gr_passwd; - int gr_gid; - char **gr_mem; -}; - -#endif -- cgit v1.2.1