Skip to content

Commit a893e40

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix incompatible pointer type warnings
2 parents dbbf5ff + 9e226b2 commit a893e40

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

build/php.m4

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,33 +1260,21 @@ dnl
12601260
dnl PHP_MISSING_TIME_R_DECL
12611261
dnl
12621262
AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
1263-
AC_MSG_CHECKING([for missing declarations of reentrant functions])
1264-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm *(*func)(void) = localtime_r]])],[
1265-
:
1266-
],[
1267-
AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
1268-
])
1269-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm *(*func)(void) = gmtime_r]])],[
1270-
:
1271-
],[
1272-
AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
1273-
])
1274-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[char *(*func)(void) = asctime_r]])],[
1275-
:
1276-
],[
1277-
AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
1278-
])
1279-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[char *(*func)(void) = ctime_r]])],[
1280-
:
1281-
],[
1282-
AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
1283-
])
1284-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[char *(*func)(void) = strtok_r]])],[
1285-
:
1286-
],[
1287-
AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
1288-
])
1289-
AC_MSG_RESULT([done])
1263+
AC_CHECK_DECL([localtime_r],,
1264+
[AC_DEFINE([MISSING_LOCALTIME_R_DECL], [1], [Whether localtime_r is declared])],
1265+
[#include <time.h>])
1266+
AC_CHECK_DECL([gmtime_r],,
1267+
[AC_DEFINE([MISSING_GMTIME_R_DECL], [1], [Whether gmtime_r is declared])],
1268+
[#include <time.h>])
1269+
AC_CHECK_DECL([asctime_r],,
1270+
[AC_DEFINE([MISSING_ASCTIME_R_DECL], [1], [Whether asctime_r is declared])],
1271+
[#include <time.h>])
1272+
AC_CHECK_DECL([ctime_r],,
1273+
[AC_DEFINE([MISSING_CTIME_R_DECL], [1], [Whether ctime_r is declared])],
1274+
[#include <time.h>])
1275+
AC_CHECK_DECL([strtok_r],,
1276+
[AC_DEFINE([MISSING_STRTOK_R_DECL], [1], [Whether strtok_r is declared])],
1277+
[#include <string.h>])
12901278
])
12911279

12921280
dnl

0 commit comments

Comments
 (0)