aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-12-11 03:39:17 +0000
committerGuy Harris <guy@alum.mit.edu>2009-12-11 03:39:17 +0000
commit488253bfe74eaaf2a8720c37a2955241af7a7345 (patch)
tree45cb48bf81ba465e1d465cb2d2494dea450f0cc7 /acinclude.m4
parent0d337768a7f6c9664dd8cf04d401fbadf25bd161 (diff)
Add the time zone abbreviation to the result of abs_time_to_str() and
abs_time_secs_to_str(). svn path=/trunk/; revision=31234
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 489cd81ecc..b448939677 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -69,6 +69,40 @@ case "$host_os" in
esac
])
+#
+# AC_WIRESHARK_TIMEZONE_ABBREV
+#
+
+AC_DEFUN([AC_WIRESHARK_TIMEZONE_ABBREV],
+[
+ AC_CACHE_CHECK([for tm_zone in struct tm],
+ ac_cv_wireshark_have_tm_zone,
+ [
+ AC_TRY_COMPILE(
+ [#include <time.h>],
+ [struct tm t; t.tm_zone;],
+ ac_cv_wireshark_have_tm_zone=yes,
+ ac_cv_wireshark_have_tm_zone=no)
+ ])
+ if test $ac_cv_wireshark_have_tm_zone = yes; then
+ AC_DEFINE(HAVE_TM_ZONE, 1, [Define if tm_zone field exists in struct tm])
+ else
+ AC_CACHE_CHECK([for tzname],
+ ac_cv_wireshark_have_tzname,
+ [
+ AC_TRY_LINK(
+[#include <time.h>
+#include <stdio.h>],
+ [printf("%s", tzname[0]);]
+ ac_cv_wireshark_have_tzname=yes,
+ ac_cv_wireshark_have_tzname=no)
+ ])
+ if test $ac_cv_wireshark_have_tzname = yes; then
+ AC_DEFINE(HAVE_TZNAME, 1, [Define if tzname array exists])
+ fi
+ fi
+])
+
#
# AC_WIRESHARK_STRUCT_SA_LEN