@@ -1224,33 +1224,21 @@ dnl
12241224dnl PHP_MISSING_TIME_R_DECL
12251225dnl
12261226AC_DEFUN ( [ PHP_MISSING_TIME_R_DECL] ,[
1227- AC_MSG_CHECKING ( [ for missing declarations of reentrant functions] )
1228- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ struct tm *(*func)(void) = localtime_r] ] ) ] ,[
1229- :
1230- ] ,[
1231- AC_DEFINE ( MISSING_LOCALTIME_R_DECL ,1 ,[ Whether localtime_r is declared] )
1232- ] )
1233- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ struct tm *(*func)(void) = gmtime_r] ] ) ] ,[
1234- :
1235- ] ,[
1236- AC_DEFINE ( MISSING_GMTIME_R_DECL ,1 ,[ Whether gmtime_r is declared] )
1237- ] )
1238- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ char *(*func)(void) = asctime_r] ] ) ] ,[
1239- :
1240- ] ,[
1241- AC_DEFINE ( MISSING_ASCTIME_R_DECL ,1 ,[ Whether asctime_r is declared] )
1242- ] )
1243- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <time.h>] ] , [ [ char *(*func)(void) = ctime_r] ] ) ] ,[
1244- :
1245- ] ,[
1246- AC_DEFINE ( MISSING_CTIME_R_DECL ,1 ,[ Whether ctime_r is declared] )
1247- ] )
1248- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <string.h>] ] , [ [ char *(*func)(void) = strtok_r] ] ) ] ,[
1249- :
1250- ] ,[
1251- AC_DEFINE ( MISSING_STRTOK_R_DECL ,1 ,[ Whether strtok_r is declared] )
1252- ] )
1253- AC_MSG_RESULT ( [ done] )
1227+ AC_CHECK_DECL ( [ localtime_r] ,,
1228+ [ AC_DEFINE ( [ MISSING_LOCALTIME_R_DECL] , [ 1] , [ Whether localtime_r is declared] ) ] ,
1229+ [ #include <time.h>] )
1230+ AC_CHECK_DECL ( [ gmtime_r] ,,
1231+ [ AC_DEFINE ( [ MISSING_GMTIME_R_DECL] , [ 1] , [ Whether gmtime_r is declared] ) ] ,
1232+ [ #include <time.h>] )
1233+ AC_CHECK_DECL ( [ asctime_r] ,,
1234+ [ AC_DEFINE ( [ MISSING_ASCTIME_R_DECL] , [ 1] , [ Whether asctime_r is declared] ) ] ,
1235+ [ #include <time.h>] )
1236+ AC_CHECK_DECL ( [ ctime_r] ,,
1237+ [ AC_DEFINE ( [ MISSING_CTIME_R_DECL] , [ 1] , [ Whether ctime_r is declared] ) ] ,
1238+ [ #include <time.h>] )
1239+ AC_CHECK_DECL ( [ strtok_r] ,,
1240+ [ AC_DEFINE ( [ MISSING_STRTOK_R_DECL] , [ 1] , [ Whether strtok_r is declared] ) ] ,
1241+ [ #include <string.h>] )
12541242] )
12551243
12561244dnl
0 commit comments