aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2014-09-17 02:27:01 -0700
committerLev Walkin <vlm@lionet.info>2014-09-17 02:27:01 -0700
commit04fbe62bbcb53c999698b67b1f0e9fdff3f37d92 (patch)
tree72a6baf6efd5fe384c381a1a3947337a04a564a4
parenteace46c5dbb3f3e176ad8b0149aedd71b651f542 (diff)
check if timegm is present before emulating
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure31
-rw-r--r--configure.ac1
-rw-r--r--skeletons/GeneralizedTime.c2
-rw-r--r--tests/125-bitstring-constraint-OK.asn1.-X2
5 files changed, 28 insertions, 11 deletions
diff --git a/config.h.in b/config.h.in
index 383523ff..4ee7da1d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -45,6 +45,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the `timegm' function. */
+#undef HAVE_TIMEGM
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/configure b/configure
index 83cc4e49..c621f2c9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for asn1c 0.9.27.
+# Generated by GNU Autoconf 2.69 for asn1c 0.9.28.
#
# Report bugs to <vlm@lionet.info>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='asn1c'
PACKAGE_TARNAME='asn1c'
-PACKAGE_VERSION='0.9.27'
-PACKAGE_STRING='asn1c 0.9.27'
+PACKAGE_VERSION='0.9.28'
+PACKAGE_STRING='asn1c 0.9.28'
PACKAGE_BUGREPORT='vlm@lionet.info'
PACKAGE_URL=''
@@ -1320,7 +1320,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures asn1c 0.9.27 to adapt to many kinds of systems.
+\`configure' configures asn1c 0.9.28 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1390,7 +1390,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of asn1c 0.9.27:";;
+ short | recursive ) echo "Configuration of asn1c 0.9.28:";;
esac
cat <<\_ACEOF
@@ -1501,7 +1501,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-asn1c configure 0.9.27
+asn1c configure 0.9.28
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1924,7 +1924,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by asn1c $as_me 0.9.27, which was
+It was created by asn1c $as_me 0.9.28, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2739,7 +2739,7 @@ fi
# Define the identity of the package.
PACKAGE='asn1c'
- VERSION='0.9.27'
+ VERSION='0.9.28'
cat >>confdefs.h <<_ACEOF
@@ -13302,6 +13302,17 @@ _ACEOF
fi
done
+for ac_func in timegm
+do :
+ ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
+if test "x$ac_cv_func_timegm" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TIMEGM 1
+_ACEOF
+
+fi
+done
+
ac_config_files="$ac_config_files skeletons/tests/Makefile libasn1compiler/Makefile libasn1parser/Makefile libasn1print/Makefile asn1c/tests/Makefile libasn1fix/Makefile doc/docsrc/Makefile skeletons/Makefile examples/Makefile asn1c/Makefile doc/Makefile asn1c.spec Makefile"
@@ -13840,7 +13851,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by asn1c $as_me 0.9.27, which was
+This file was extended by asn1c $as_me 0.9.28, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13906,7 +13917,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-asn1c config.status 0.9.27
+asn1c config.status 0.9.28
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 05b373a3..889b6a8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,7 @@ AC_SEARCH_LIBS(getopt, iberty)
AC_CHECK_FUNCS(strtoimax strtoll)
AC_CHECK_FUNCS(mergesort)
AC_CHECK_FUNCS(mkstemps)
+AC_CHECK_FUNCS(timegm)
AC_OUTPUT( \
skeletons/tests/Makefile \
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index 4b0ae5d4..9672c967 100644
--- a/skeletons/GeneralizedTime.c
+++ b/skeletons/GeneralizedTime.c
@@ -128,6 +128,7 @@ static long GMTOFF(struct tm a){
tzset(); \
} while(0); } while(0);
+#ifndef HAVE_TIMEGM
#ifdef _EMULATE_TIMEGM
static time_t timegm(struct tm *tm) {
time_t tloc;
@@ -138,6 +139,7 @@ static time_t timegm(struct tm *tm) {
return tloc;
}
#endif /* _EMULATE_TIMEGM */
+#endif
#ifndef __ASN_INTERNAL_TEST_MODE__
diff --git a/tests/125-bitstring-constraint-OK.asn1.-X b/tests/125-bitstring-constraint-OK.asn1.-X
index cb3bc7c2..b33feccd 100644
--- a/tests/125-bitstring-constraint-OK.asn1.-X
+++ b/tests/125-bitstring-constraint-OK.asn1.-X
@@ -1,4 +1,4 @@
-<!-- XML DTD generated by asn1c-0.9.27 -->
+<!-- XML DTD generated by asn1c-0.9.28 -->
<!-- ASN.1 module
ModuleBitStringConstraint { iso org(3) dod(6) internet(1) private(4)