com php-src: Remove obsolescent AC_HEADER_STDC and memc py check: Zend/Zend.m4 acinclude.m4 configure .ac ext/json/config.m4
ext/mbstring/libmbfl/config. h.in ext/xmlrpc/libxmlrpc/acinclude.m4 main/php.h win32/build/config.w32.h.in

From: Date: Fri, 01 Mar 2019 18:22:44 +0000
Subject: com php-src: Remove obsolescent AC_HEADER_STDC and memc py check: Zend/Zend.m4 acinclude.m4 configure .ac ext/json/config.m4
ext/mbstring/libmbfl/config. h.in ext/xmlrpc/libxmlrpc/acinclude.m4 main/php.h win32/build/config.w32.h.in
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104936@lists.php.net to get a copy of this message
Commit: a700451706b1a6da75f08a6a7e331635e17a6e99 Author: Peter Kokot <peterkokot@gmail.com> Thu, 28 Feb 2019 00:41:30 +0100 Parents: 7c351ba65ca861470373dd1467138d668dcac5f3 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a700451706b1a6da75f08a6a7e331635e17a6e99 Log: Remove obsolescent AC_HEADER_STDC and memcpy check Autoconf 2.59d (released in 2006) [1] started promoting several macros as not relevant for newer systems anymore, including the AC_HEADER_STDC. This macro checks if given system has C89 compliant header files such as <string.h>, <stdlib.h>, <stdarg.h>, <float.h>,... and defines the STDC_HEADERS symbol [2]. Case is that current systems should be well supported with at least C89 standard headers [3]. Given headers are still additionally checked with the AC_PROG_CC macro, yet not needed anyway. Additionally, the HAVE_MEMCPY check has been removed. The memcpy function is standardized by C89 and later. Refs: [1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS [2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html [3] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 Bugs: https://bugs.php.net/4 Changed paths: M Zend/Zend.m4 M acinclude.m4 M configure.ac M ext/json/config.m4 M ext/mbstring/libmbfl/config.h.in M ext/xmlrpc/libxmlrpc/acinclude.m4 M main/php..h M win32/build/config.w32.h.in Diff: diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 885af15..392d28e 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -29,7 +29,6 @@ AC_DEFUN([LIBZEND_BASIC_CHECKS],[ AC_REQUIRE([AC_PROG_YACC]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CC_C_O]) -AC_REQUIRE([AC_HEADER_STDC]) LIBZEND_BISON_CHECK @@ -79,7 +78,7 @@ LIBZEND_CHECK_INT_TYPE(uint32_t) dnl Checks for library functions. AC_FUNC_ALLOCA -AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp) +AC_CHECK_FUNCS(strdup getpid kill strtod strtol finite fpclass sigsetjmp) AC_CHECK_DECLS([isfinite, isnan, isinf], [], [], [[#include <math.h>]]) diff --git a/acinclude.m4 b/acinclude.m4 index 2c6f4b7..1818743 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1030,10 +1030,8 @@ AC_DEFUN([_PHP_CHECK_SIZEOF], [ old_LDFLAGS=$LDFLAGS LDFLAGS= AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> -#if STDC_HEADERS #include <stdlib.h> #include <stddef.h> -#endif #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif @@ -1103,10 +1101,8 @@ AC_CACHE_VAL(ac_cv_type_in_addr_t, changequote(<<,>>)dnl <<in_addr_t[^a-zA-Z_0-9]>>dnl changequote([,]), [#include <sys/types.h> -#if STDC_HEADERS #include <stdlib.h> #include <stddef.h> -#endif #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl diff --git a/configure.ac b/configure.ac index 57705d2..45845cd 100644 --- a/configure.ac +++ b/configure.ac @@ -417,9 +417,6 @@ PHP_CHECK_FUNC(inet_aton, resolv, bind) dnl Then headers. dnl ------------------------------------------------------------------------- -dnl Checks for header files. -AC_HEADER_STDC - dnl QNX requires unix.h to allow functions in libunix to work properly AC_CHECK_HEADERS([ \ inttypes.h \ @@ -629,7 +626,6 @@ localtime_r \ lockf \ lchown \ lrand48 \ -memcpy \ memmove \ mkstemp \ mmap \ diff --git a/ext/json/config.m4 b/ext/json/config.m4 index 882e39b..ba25582 100644 --- a/ext/json/config.m4 +++ b/ext/json/config.m4 @@ -5,7 +5,6 @@ PHP_ARG_ENABLE(json, whether to enable JavaScript Object Serialization support, if test "$PHP_JSON" != "no"; then AC_DEFINE([HAVE_JSON],1 ,[whether to enable JavaScript Object Serialization support]) - AC_HEADER_STDC PHP_NEW_EXTENSION(json, json.c \ diff --git a/ext/mbstring/libmbfl/config.h.in b/ext/mbstring/libmbfl/config.h.in index 8d3cd73..fba649b 100644 --- a/ext/mbstring/libmbfl/config.h.in +++ b/ext/mbstring/libmbfl/config.h.in @@ -63,9 +63,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - /* Version number of package */ #undef VERSION diff --git a/ext/xmlrpc/libxmlrpc/acinclude.m4 b/ext/xmlrpc/libxmlrpc/acinclude.m4 index b425377..d73ae8c 100644 --- a/ext/xmlrpc/libxmlrpc/acinclude.m4 +++ b/ext/xmlrpc/libxmlrpc/acinclude.m4 @@ -6,12 +6,11 @@ AC_DEFUN([XMLRPC_FUNCTION_CHECKS],[ AC_CHECK_FUNCS( \ strtoul strtoull snprintf \ strstr strpbrk strerror\ - memcpy memmove) + memmove) ]) AC_DEFUN([XMLRPC_HEADER_CHECKS],[ -AC_HEADER_STDC AC_CHECK_HEADERS(xmlparse.h xmltok.h strings.h) ]) diff --git a/main/php.h b/main/php.h index 317a048...066685c 100644 --- a/main/php.h +++ b/main/php.h @@ -230,17 +230,7 @@ typedef unsigned int socklen_t; #include "zend_hash.h" #include "zend_alloc.h" #include "zend_stack.h" - -#if STDC_HEADERS -# include <string.h> -#else -# ifndef HAVE_MEMCPY -# define memcpy(d, s, n) bcopy((s), (d), (n)) -# endif -# ifndef HAVE_MEMMOVE -# define memmove(d, s, n) bcopy ((s), (d), (n)) -# endif -#endif +#include <string.h> #ifndef HAVE_STRERROR char *strerror(int); diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index ccfad0a...1c4c691 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -69,13 +69,11 @@ #undef HAVE_STRUCT_STAT_ST_BLKSIZE #undef HAVE_STRUCT_STAT_ST_BLOCKS #define HAVE_STRUCT_STAT_ST_RDEV 1 -#define STDC_HEADERS 1 #define REGEX 1 #define HSREGEX 1 #define HAVE_GCVT 1 #define HAVE_GETLOGIN 1 #define HAVE_GETTIMEOFDAY 1 -#define HAVE_MEMCPY 1 #define HAVE_MEMMOVE 1 #define HAVE_PUTENV 1 #define HAVE_REGCOMP 1

« previous php.cvs (#104936) next »