File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -728,9 +728,31 @@ dnl# [], [AC_MSG_WARN([Required C library routine not found; try adding __EXTEN
728
728
dnl These appear with CFLAGS="-std=c99 -D_POSIX_C_SOURCE=200112L":
729
729
dnl # Methods below currently do not cause build errors for C99+ modes so are
730
730
dnl # not tested as thoroughly as those further below:
731
- AC_CHECK_FUNCS ( strtok_r fileno localtime_r localtime_s gmtime_r gmtime_s sigemptyset sigaction ,
731
+ AC_CHECK_FUNCS ( strtok_r fileno sigemptyset sigaction ,
732
732
[ ] , [ AC_MSG_WARN ( [ Required C library routine not found; try adding -D_POSIX_C_SOURCE=200112L] ) ] )
733
733
734
+ dnl For these we have a fallback implementation via the other,
735
+ dnl if at least one is available, so initial check is quiet.
736
+ dnl This typically pops up in POSIX vs. Windows builds:
737
+ AC_CHECK_FUNCS ( localtime_r localtime_s gmtime_r gmtime_s ,
738
+ [ ] , [ ] )
739
+
740
+ AC_MSG_CHECKING ( [ for at least one gmtime implementation] )
741
+ AS_IF ( [ test x"${ac_cv_func_gmtime_s}-${ac_cv_func_gmtime_r}" = "xno-no"] , [
742
+ AC_MSG_RESULT ( [ no] )
743
+ AC_MSG_WARN ( [ Required C library routine gmtime_s nor gmtime_r was not found; try adding -D_POSIX_C_SOURCE=200112L] )
744
+ ] ,[
745
+ AC_MSG_RESULT ( [ yes] )
746
+ ] )
747
+
748
+ AC_MSG_CHECKING ( [ for at least one localtime implementation] )
749
+ AS_IF ( [ test x"${ac_cv_func_localtime_s}-${ac_cv_func_localtime_r}" = "xno-no"] , [
750
+ AC_MSG_RESULT ( [ no] )
751
+ AC_MSG_WARN ( [ Required C library routine localtime_s nor localtime_r was not found; try adding -D_POSIX_C_SOURCE=200112L] )
752
+ ] ,[
753
+ AC_MSG_RESULT ( [ yes] )
754
+ ] )
755
+
734
756
AC_LANG_PUSH ( [ C] )
735
757
736
758
AC_CHECK_HEADER ( [ string.h] ,
You can’t perform that action at this time.
0 commit comments