diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 46 |
1 files changed, 40 insertions, 6 deletions
@@ -17062,16 +17062,50 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac -# Check for functions that some compilers lack (or name differently) -for ac_func in gmtime_r _gmtime64_s +# Check for threadsafe variants of gmtime +# Note: check for gmtime_s is a bit more complex as it is implemented as a macro +for ac_func in gmtime_r do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" +if test "x$ac_cv_func_gmtime_r" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GMTIME_R 1 _ACEOF +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmtime_s" >&5 +$as_echo_n "checking for gmtime_s... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <time.h> +int +main () +{ + + time_t t; + struct tm m; + gmtime_s(&m, &t); + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_GMTIME_S 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi done |