Skip to content

Normalize AC_CHECK_FUNC* first argument #14700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1828,10 +1828,10 @@ AC_DEFUN([PHP_SETUP_ICONV], [
dnl Reset LIBS temporarily as it may have already been included -liconv in.
LIBS_save="$LIBS"
LIBS=
AC_CHECK_FUNC(iconv, [
AC_CHECK_FUNC([iconv], [
found_iconv=yes
],[
AC_CHECK_FUNC(libiconv,[
AC_CHECK_FUNC([libiconv], [
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
found_iconv=yes
])
Expand Down
122 changes: 61 additions & 61 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -582,67 +582,67 @@ AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
dnl Checks for library functions.
dnl ----------------------------------------------------------------------------

AC_CHECK_FUNCS(
alphasort \
asctime_r \
chroot \
ctime_r \
explicit_memset \
fdatasync \
flock \
ftok \
funopen \
gai_strerror \
getcwd \
gethostname \
getloadavg \
getlogin \
getprotobyname \
getprotobynumber \
getservbyname \
getservbyport \
getrusage \
gettimeofday \
gmtime_r \
getpwnam_r \
getgrnam_r \
getpwuid_r \
getwd \
glob \
localtime_r \
lchown \
memcntl \
memfd_create \
mkstemp \
mmap \
nice \
nl_langinfo \
poll \
pthread_jit_write_protect_np \
putenv \
scandir \
setitimer \
setenv \
shutdown \
sigprocmask \
statfs \
statvfs \
std_syslog \
strcasecmp \
strnlen \
strptime \
strtok_r \
symlink \
tzset \
unsetenv \
usleep \
utime \
vasprintf \
asprintf \
memmem \
memrchr \
mempcpy \
)
AC_CHECK_FUNCS(m4_normalize([
alphasort
asctime_r
asprintf
chroot
ctime_r
explicit_memset
fdatasync
flock
ftok
funopen
gai_strerror
getcwd
getgrnam_r
gethostname
getloadavg
getlogin
getprotobyname
getprotobynumber
getpwnam_r
getpwuid_r
getrusage
getservbyname
getservbyport
gettimeofday
getwd
glob
gmtime_r
lchown
localtime_r
memcntl
memfd_create
memmem
mempcpy
memrchr
mkstemp
mmap
nice
nl_langinfo
poll
pthread_jit_write_protect_np
putenv
scandir
setenv
setitimer
shutdown
sigprocmask
statfs
statvfs
std_syslog
strcasecmp
strnlen
strptime
strtok_r
symlink
tzset
unsetenv
usleep
utime
vasprintf
]))

AC_CHECK_FUNC([inet_ntop],,[AC_MSG_ERROR([Required inet_ntop not found.])])
AC_CHECK_FUNC([inet_pton],,[AC_MSG_ERROR([Required inet_pton not found.])])
Expand Down
2 changes: 1 addition & 1 deletion ext/date/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl Check for headers needed by timelib
AC_CHECK_HEADERS([io.h])

dnl Check for strtoll, atoll
AC_CHECK_FUNCS(strtoll atoll)
AC_CHECK_FUNCS([strtoll atoll])

PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
Expand Down
13 changes: 12 additions & 1 deletion ext/ldap/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,18 @@ if test "$PHP_LDAP" != "no"; then

dnl Solaris 2.8 claims to be 2004 API, but doesn't have ldap_parse_reference()
dnl nor ldap_start_tls_s()
AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find ldap_parse_extended_result ldap_extended_operation ldap_extended_operation_s ldap_passwd ldap_whoami_s ldap_refresh_s])
AC_CHECK_FUNCS(m4_normalize([
ldap_control_find
ldap_extended_operation
ldap_extended_operation_s
ldap_parse_extended_result
ldap_parse_reference
ldap_parse_result
ldap_passwd
ldap_refresh_s
ldap_start_tls_s
ldap_whoami_s
]))

dnl SASL check
if test "$PHP_LDAP_SASL" != "no"; then
Expand Down
19 changes: 17 additions & 2 deletions ext/posix/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,22 @@ if test "$PHP_POSIX" = "yes"; then
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
PHP_NEW_EXTENSION(posix, posix.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)

AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups initgroups getgrgid_r eaccess)
AC_CHECK_FUNCS(m4_normalize([
ctermid
eaccess
getgrgid_r
getgroups
getpgid
getrlimit
getsid
initgroups
mkfifo
mknod
setegid
seteuid
setrlimit
setsid
]))

dnl Check for makedev. If it's defined as a macro, AC_CHECK_FUNCS won't work.
dnl Required headers are included by the AC_HEADER_MAJOR logic.
Expand All @@ -25,7 +40,7 @@ if test "$PHP_POSIX" = "yes"; then
dnl Skip pathconf and fpathconf check on musl libc due to limited implementation
dnl (first argument is not validated and has different error).
AS_IF([command -v ldd >/dev/null && ldd --version 2>&1 | grep -q "^musl"],[],
[AC_CHECK_FUNCS(pathconf fpathconf)])
[AC_CHECK_FUNCS([pathconf fpathconf])])

AC_CACHE_CHECK([for working ttyname_r() implementation],
[php_cv_func_ttyname_r],
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ dnl
dnl Check if there is a support means of creating a new process and defining
dnl which handles it receives
dnl
AC_CHECK_FUNCS(fork CreateProcess, [
AC_CHECK_FUNCS([fork CreateProcess], [
php_can_support_proc_open=yes
break
],[
Expand Down
2 changes: 1 addition & 1 deletion sapi/cli/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PHP_ARG_ENABLE([cli],,
[yes],
[no])

AC_CHECK_FUNCS(setproctitle)
AC_CHECK_FUNCS([setproctitle])

AC_CHECK_HEADERS([sys/pstat.h])

Expand Down
Loading