From aabb889b0c85b8395bb4fbefa9cf3476b6c12e38 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 7 Mar 2024 07:46:25 +0100 Subject: patch test suite for zlib-ng --- php-7.4.33-gcc14.patch | 169 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) (limited to 'php-7.4.33-gcc14.patch') diff --git a/php-7.4.33-gcc14.patch b/php-7.4.33-gcc14.patch index 7af776f..eef34ad 100644 --- a/php-7.4.33-gcc14.patch +++ b/php-7.4.33-gcc14.patch @@ -30,3 +30,172 @@ diff -up php-7.4.33/sapi/litespeed/lsapi_main.c.gcc14 php-7.4.33/sapi/litespeed/ #include "lsapilib.h" #include + + +Adapted for 7.4 from: + +From aeaab8ee3e52f74c042a861e394437d6554b36be Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 9 Sep 2019 21:29:03 +0200 +Subject: [PATCH] Port various autoconf bits to C99 compilers + +C99 no longer has implicit function declarations and implicit ints. +Current GCC versions enable them as an extension, but this will +change in a future GCC version. +--- + Zend/Zend.m4 | 2 ++ + build/libtool.m4 | 5 +---- + build/php.m4 | 17 ++++++++++------- + configure.ac | 2 ++ + ext/standard/config.m4 | 22 ++++++++++++++++++++++ + 5 files changed, 37 insertions(+), 11 deletions(-) + +diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 +index 054e2621a4057..57a12ac36ba60 100644 +--- a/Zend/Zend.m4 ++++ b/Zend/Zend.m4 +@@ -157,6 +157,7 @@ AC_MSG_CHECKING(whether double cast to long preserves least significant bits) + + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include ++#include + + int main() + { +@@ -256,6 +257,7 @@ AC_MSG_CHECKING(for MM alignment and log values) + + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include ++#include + + typedef union _mm_align_test { + void *ptr; +diff --git a/build/libtool.m4 b/build/libtool.m4 +index f7f51642920f9..577dad4cbe313 100644 +--- a/build/libtool.m4 ++++ b/build/libtool.m4 +@@ -945,6 +945,7 @@ else + #endif + + #include ++#include + + #ifdef RTLD_GLOBAL + # define LT_DLGLOBAL RTLD_GLOBAL +diff --git a/build/php.m4 b/build/php.m4 +index 25f5aa762b892..529876b6b67c6 100644 +--- a/build/php.m4 ++++ b/build/php.m4 +@@ -1120,7 +1120,7 @@ AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + +-main() { ++int main() { + char buf[27]; + struct tm t; + time_t old = 0; +@@ -1136,7 +1136,7 @@ return (1); + ],[ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +-main() { ++int main() { + struct tm t, *s; + time_t old = 0; + char buf[27], *p; +@@ -1597,7 +1600,7 @@ AC_DEFUN([PHP_CHECK_FUNC_LIB],[ + if test "$found" = "yes"; then + ac_libs=$LIBS + LIBS="$LIBS -l$2" +- AC_RUN_IFELSE([AC_LANG_SOURCE([[main() { return (0); }]])],[found=yes],[found=no],[found=no]) ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return (0); }]])],[found=yes],[found=no],[found=no]) + LIBS=$ac_libs + fi + +@@ -2285,7 +2288,7 @@ AC_DEFUN([PHP_TEST_WRITE_STDOUT],[ + + #define TEXT "This is the test message -- " + +-main() ++int main() + { + int n; + +diff --git a/configure.ac b/configure.ac +index d759b027517e5..e15b83ca25296 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -665,6 +665,8 @@ + #include + #include + #include ++#include ++#include + #ifndef AF_INET + # include + #endif +diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 +index 9f85ec2b7080d..5b49e5d661f3c 100644 +--- a/ext/standard/config.m4 ++++ b/ext/standard/config.m4 +@@ -71,6 +71,9 @@ AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[ + #include + #endif + ++#include ++#include ++ + int main() { + #if HAVE_CRYPT + char *encrypted = crypt("rasmuslerdorf","rl"); +@@ -98,6 +101,9 @@ AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[ + #include + #endif + ++#include ++#include ++ + int main() { + #if HAVE_CRYPT + char *encrypted = crypt("rasmuslerdorf","_J9..rasm"); +@@ -125,6 +131,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #endif + ++#include ++#include ++ + int main() { + #if HAVE_CRYPT + char salt[15], answer[40]; +@@ -162,6 +171,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #endif + ++#include ++#include ++ + int main() { + #if HAVE_CRYPT + char salt[30], answer[70]; +@@ -196,6 +208,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #endif + ++#include ++#include ++ + int main() { + #if HAVE_CRYPT + char salt[21], answer[21+86]; +@@ -229,6 +244,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #endif + ++#include ++#include ++ + int main() { + #if HAVE_CRYPT + char salt[21], answer[21+43]; -- cgit