]> granicus.if.org Git - apache/commitdiff
Check for timegm() and for tm_gmtoff in struct tm.
authorMartin Kraemer <martin@apache.org>
Thu, 31 Jan 2002 14:51:37 +0000 (14:51 +0000)
committerMartin Kraemer <martin@apache.org>
Thu, 31 Jan 2002 14:51:37 +0000 (14:51 +0000)
These are used for the USE_MDTM case in proxy_ftp.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93129 13f79535-47bb-0310-9956-ffa450edef68

acconfig.h [new file with mode: 0644]
configure.in

diff --git a/acconfig.h b/acconfig.h
new file mode 100644 (file)
index 0000000..31ad39f
--- /dev/null
@@ -0,0 +1,2 @@
+/* Define this if struct tm has a field tm_gmtoff */
+#undef HAVE_GMTOFF
index f4e6fda0f7acddb3f36c8269c91e1d3c3508c226..285d6464f2ae05d83ef07fef5cf9d9d52c8c087d 100644 (file)
@@ -239,8 +239,18 @@ getpwnam \
 getgrnam \
 initgroups \
 bindprocessor \
+timegm \
 )
 
+dnl ## Check for the tm_gmtoff field in struct tm to get the timezone diffs
+AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
+  ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
+if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
+    AC_DEFINE(HAVE_GMTOFF)
+fi
+
 dnl ## Set up any appropriate OS-specific environment variables for apachectl
 
 case $host in