summaryrefslogtreecommitdiffstats
path: root/php-7.4.33-gcc14.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-03-07 07:46:25 +0100
committerRemi Collet <remi@php.net>2024-03-07 07:46:25 +0100
commitaabb889b0c85b8395bb4fbefa9cf3476b6c12e38 (patch)
tree98e504a67dc3233d20ac4a70531431a29bc8c671 /php-7.4.33-gcc14.patch
parent17420bc31fbfca54f7234082b8c59a05db1e4384 (diff)
patch test suite for zlib-ng
Diffstat (limited to 'php-7.4.33-gcc14.patch')
-rw-r--r--php-7.4.33-gcc14.patch169
1 files changed, 169 insertions, 0 deletions
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 <stdio.h>
+
+
+Adapted for 7.4 from:
+
+From aeaab8ee3e52f74c042a861e394437d6554b36be Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+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 <limits.h>
++#include <stdlib.h>
+
+ int main()
+ {
+@@ -256,6 +257,7 @@ AC_MSG_CHECKING(for MM alignment and log values)
+
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
++#include <stdlib.h>
+
+ 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 <stdio.h>
++#include <stdlib.h>
+
+ #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 <time.h>
+
+-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 <time.h>
+-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 <string.h>
+ #include <netdb.h>
+ #include <sys/types.h>
++#include <string.h>
++#include <stdlib.h>
+ #ifndef AF_INET
+ # include <sys/socket.h>
+ #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 <crypt.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ 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 <crypt.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ int main() {
+ #if HAVE_CRYPT
+ char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
+@@ -125,6 +131,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <crypt.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ int main() {
+ #if HAVE_CRYPT
+ char salt[15], answer[40];
+@@ -162,6 +171,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <crypt.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ int main() {
+ #if HAVE_CRYPT
+ char salt[30], answer[70];
+@@ -196,6 +208,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <crypt.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ int main() {
+ #if HAVE_CRYPT
+ char salt[21], answer[21+86];
+@@ -229,6 +244,9 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <crypt.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++
+ int main() {
+ #if HAVE_CRYPT
+ char salt[21], answer[21+43];