From cf928df2ba894052a64ebb14fed90547646e3e89 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 9 Feb 2024 13:23:40 +0100 Subject: [PATCH] Remove obsolete check for missing fclose declaration SunOS 4.1.4 from 1994 didn't have fclose declared in standard header stdio.h. This doesn't need to be checked anymore, as fclose is part of the C89+ standard and declaration is present on Solaris 10 (SunOS 5.10) and later. --- UPGRADING.INTERNALS | 1 + build/php.m4 | 16 ---------------- configure.ac | 1 - ext/standard/file.c | 4 ---- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 82066099f01fb..50bc4c9fbea07 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -61,6 +61,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES - Symbol HAVE_JSON has been removed (ext/json is always available since PHP 8.0). - Symbol DARWIN has been removed (use __APPLE__ to target Darwin systems). + - Symbol MISSING_FCLOSE_DECL and M4 macro PHP_MISSING_FCLOSE_DECL removed. c. Windows build system changes - The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19 have diff --git a/build/php.m4 b/build/php.m4 index 68d2bd895e5e2..a6707abed4506 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1286,22 +1286,6 @@ if test "$ac_cv_struct_flock" = "yes" ; then fi ]) -dnl -dnl PHP_MISSING_FCLOSE_DECL -dnl -dnl See if we have broken header files like SunOS has. -dnl -AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[ - AC_MSG_CHECKING([for fclose declaration]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int (*func)() = fclose]])],[ - AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ]) - AC_MSG_RESULT([ok]) - ],[ - AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ]) - AC_MSG_RESULT([missing]) - ]) -]) - dnl dnl PHP_SOCKADDR_CHECKS dnl diff --git a/configure.ac b/configure.ac index 0ce4e7042b7a6..410c0168906b5 100644 --- a/configure.ac +++ b/configure.ac @@ -464,7 +464,6 @@ dnl ---------------------------------------------------------------------------- AC_STRUCT_TIMEZONE PHP_MISSING_TIME_R_DECL -PHP_MISSING_FCLOSE_DECL PHP_STRUCT_FLOCK AC_CHECK_TYPES(socklen_t, [], [], [ diff --git a/ext/standard/file.c b/ext/standard/file.c index f0ddc2e30f662..f1842941f234b 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -86,10 +86,6 @@ # include #endif -#if MISSING_FCLOSE_DECL -extern int fclose(FILE *); -#endif - #ifdef HAVE_SYS_MMAN_H # include #endif