]> granicus.if.org Git - php/commitdiff
Sync functions checks
authorPeter Kokot <peterkokot@gmail.com>
Fri, 28 Jun 2019 21:10:37 +0000 (23:10 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Sun, 30 Jun 2019 21:57:54 +0000 (23:57 +0200)
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since
  560ed89bfbb56526251e9bd2fbcb27e5932641d8 which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6911c785f698d724b2ff61e7aebb737 and
  not used.
- setpgid check removed since HAVE_SETPGID is not used

Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice

Duplicated checks removed:
- gethostname
- getlogin
- getpwuid_r
- socketpair

- mprotect check simplified

TSRM/tsrm.m4
Zend/Zend.m4
configure.ac
ext/opcache/config.m4
ext/pcntl/config.m4
ext/posix/config.m4
ext/sockets/config.m4
ext/standard/config.m4

index f269abf8a67944c569c90af2a075c85be6aaa6a2..9caad3ab65cb72df1130a04ce73dc3332439c576 100644 (file)
@@ -6,8 +6,6 @@ dnl
 AC_DEFUN([TSRM_BASIC_CHECKS],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_RANLIB])dnl
-
-AC_CHECK_FUNCS(sigprocmask)
 ])
 
 dnl
index 85523237ed2452a517ef985e67bb8066c9f1bb16..be45a5c60091176fe89f93842b176ae4d13c96d1 100644 (file)
@@ -146,7 +146,7 @@ _LT_AC_TRY_DLOPEN_SELF([
 ])
 
 dnl Checks for library functions.
-AC_CHECK_FUNCS(getpid kill finite fpclass sigsetjmp)
+AC_CHECK_FUNCS(getpid kill finite sigsetjmp)
 
 AC_CHECK_DECLS([isfinite, isnan, isinf], [], [], [[#include <math.h>]])
 
index eeb806f639ced5903aa69527720bae8bc583bd7c..5a230200cac2f84b937528e85989ed46a3448f3b 100644 (file)
@@ -592,23 +592,26 @@ cuserid \
 crypt \
 explicit_memset \
 flock \
+fpclass \
 ftok \
 funopen \
 gai_strerror \
 gcvt \
+getcwd \
 getloadavg \
 getlogin \
 getprotobyname \
 getprotobynumber \
 getservbyname \
 getservbyport \
-gethostname \
 getrusage \
 gettimeofday \
 gmtime_r \
 getpwnam_r \
 getgrnam_r \
 getpwuid_r \
+getwd \
+glob \
 grantpt \
 inet_ntoa \
 inet_ntop \
@@ -619,9 +622,11 @@ localtime_r \
 lockf \
 lchown \
 lrand48 \
+mbrlen \
 memmove \
 mkstemp \
 mmap \
+nice \
 nl_langinfo \
 poll \
 ptsname \
@@ -632,10 +637,10 @@ rand_r \
 scandir \
 setitimer \
 setenv \
-setpgid \
 setsockopt \
 setvbuf \
 shutdown \
+sigprocmask \
 sin \
 srand48 \
 srandom \
@@ -645,6 +650,7 @@ std_syslog \
 strcasecmp \
 strdup \
 strerror \
+strfmon \
 strnlen \
 strptime \
 strtok_r \
index dc32c5b94fbfcadc6be3ab6b7b714323f6925642..6355f206a5a5fb7ee934282bc9d6566e4d14dd0b 100644 (file)
@@ -17,9 +17,7 @@ if test "$PHP_OPCACHE" != "no"; then
     AC_DEFINE(HAVE_HUGE_CODE_PAGES, 1, [Define to enable copying PHP CODE pages into HUGE PAGES (experimental)])
   fi
 
-  AC_CHECK_FUNC(mprotect,[
-    AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
-  ])
+  AC_CHECK_FUNCS([mprotect])
 
   AC_MSG_CHECKING(for sysvipc shared memory support)
   AC_RUN_IFELSE([AC_LANG_SOURCE([[
index bf7f3064b4158082abc4dac3c2cd440859adbc0a..9b6957230de8b8f09bf3bdb3168a2043257b1145 100644 (file)
@@ -7,7 +7,7 @@ if test "$PHP_PCNTL" != "no"; then
   AC_CHECK_FUNCS(fork, [ AC_DEFINE(HAVE_FORK,1,[ ]) ], [ AC_MSG_ERROR(pcntl: fork() not supported by this platform) ])
   AC_CHECK_FUNCS(waitpid, [ AC_DEFINE(HAVE_WAITPID,1,[ ]) ], [ AC_MSG_ERROR(pcntl: waitpid() not supported by this platform) ])
   AC_CHECK_FUNCS(sigaction, [ AC_DEFINE(HAVE_SIGACTION,1,[ ]) ], [ AC_MSG_ERROR(pcntl: sigaction() not supported by this platform) ])
-  AC_CHECK_FUNCS([getpriority setpriority wait3 wait4 sigprocmask sigwaitinfo sigtimedwait unshare])
+  AC_CHECK_FUNCS([getpriority setpriority wait3 wait4 sigwaitinfo sigtimedwait unshare])
 
   AC_MSG_CHECKING([for siginfo_t])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
index 9beea518beae6b50547cf637977224f95e07fa3c..e91041188ae735a81ac59f1f2d3e2b916501666b 100644 (file)
@@ -10,7 +10,7 @@ if test "$PHP_POSIX" = "yes"; then
 
   AC_CHECK_HEADERS([sys/mkdev.h sys/sysmacros.h])
 
-  AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod setrlimit getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
+  AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups makedev initgroups getgrgid_r)
 
   AC_MSG_CHECKING([for working ttyname_r() implementation])
   AC_RUN_IFELSE([AC_LANG_SOURCE([[
index 71cebdb3e2cc9194fd9624c5fddb2d5d22f3015c..6f5b5ba29ff43e214ccd10741ece5f66153d8051 100644 (file)
@@ -16,7 +16,7 @@ if test "$PHP_SOCKETS" != "no"; then
     AC_DEFINE(HAVE_CMSGHDR,1,[Whether you have struct cmsghdr])
   fi
 
-  AC_CHECK_FUNCS([hstrerror socketpair if_nametoindex if_indextoname])
+  AC_CHECK_FUNCS([hstrerror if_nametoindex if_indextoname])
   AC_CHECK_HEADERS([netinet/tcp.h sys/un.h sys/sockio.h])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
index b0ec90900bf736a04334ad4834e758b5fa65d8e7..9f85ec2b7080d0d4e4098604445b73171bbc9524 100644 (file)
@@ -286,7 +286,7 @@ dnl Check for available functions
 dnl
 dnl log2 could be used to improve the log function, however it requires C99. The
 dnl check for log2 should be turned on, as soon as we support C99.
-AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass mempcpy strpncpy)
+AC_CHECK_FUNCS(asinh acosh atanh log1p hypot)
 AC_FUNC_FNMATCH
 
 dnl
@@ -376,7 +376,7 @@ dnl
 dnl Check for i18n capabilities
 dnl
 AC_CHECK_HEADERS([wchar.h])
-AC_CHECK_FUNCS([mblen mbrlen mbsinit])
+AC_CHECK_FUNCS([mblen])
 AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],[
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_WCHAR_H