Skip to content

Commit ed6750e

Browse files
committed
Add tm_gmtoff test.
1 parent 97fb110 commit ed6750e

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

configure

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4724,6 +4724,41 @@ printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
47244724
fi
47254725

47264726

4727+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5
4728+
printf %s "checking for tm_gmtoff member in tm structure... " >&6; }
4729+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4730+
/* end confdefs.h. */
4731+
4732+
#include <time.h>
4733+
int
4734+
main (void)
4735+
{
4736+
4737+
struct tm t;
4738+
int o = t.tm_gmtoff;
4739+
4740+
;
4741+
return 0;
4742+
}
4743+
4744+
_ACEOF
4745+
if ac_fn_c_try_compile "$LINENO"
4746+
then :
4747+
4748+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4749+
printf "%s\n" "yes" >&6; }
4750+
4751+
printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
4752+
4753+
4754+
else $as_nop
4755+
4756+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4757+
printf "%s\n" "no" >&6; }
4758+
4759+
fi
4760+
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4761+
47274762

47284763
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
47294764
printf %s "checking for long long int... " >&6; }

configure.ac

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,24 @@ AC_COMPILE_IFELSE([
247247
])
248248

249249

250-
dnl See if we have the timegm function...
250+
dnl Test date/time functionality...
251251
AC_CHECK_FUNC([timegm], [
252252
AC_DEFINE([HAVE_TIMEGM], [1], [Do we have the timegm function?])
253253
])
254254

255+
AC_MSG_CHECKING([for tm_gmtoff member in tm structure])
256+
AC_COMPILE_IFELSE([
257+
AC_LANG_PROGRAM([[#include <time.h>]], [[
258+
struct tm t;
259+
int o = t.tm_gmtoff;
260+
]])
261+
], [
262+
AC_MSG_RESULT([yes])
263+
AC_DEFINE([HAVE_TM_GMTOFF], [1], [Have tm_gmtoff member in struct tm?])
264+
], [
265+
AC_MSG_RESULT([no])
266+
])
267+
255268

256269
dnl Check for "long long" support...
257270
AC_CACHE_CHECK([for long long int], [ac_cv_c_long_long], [

0 commit comments

Comments
 (0)