aboutsummaryrefslogtreecommitdiff
path: root/gnulib/configure
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-11-08 11:25:17 -0600
committerChristian Biesinger <cbiesinger@google.com>2019-11-15 11:48:08 -0800
commitf8e27d88e4c31089467d8717597c4153723081e6 (patch)
tree84708cf16eef4f4c3108b527622833ae1e227781 /gnulib/configure
parent5abebf3c3fd28a148e43be587c4e4065a0e53ae9 (diff)
downloadgdb-f8e27d88e4c31089467d8717597c4153723081e6.zip
gdb-f8e27d88e4c31089467d8717597c4153723081e6.tar.gz
gdb-f8e27d88e4c31089467d8717597c4153723081e6.tar.bz2
Import the time_r gnulib module
This allows GDB to use localtime_r unconditionally. See https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00022.html for details on the compile error mentioned below. gdb/ChangeLog: 2019-11-15 Christian Biesinger <cbiesinger@google.com> * gdbsupport/common-defs.h: Include time.h before pathmax.h to avoid compile errors. gnulib/ChangeLog: 2019-11-15 Christian Biesinger <cbiesinger@google.com> * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * import/Makefile.am: Update. * import/Makefile.in: Regenerate. * import/m4/gnulib-cache.m4: Update. * import/m4/gnulib-comp.m4: Update. * import/m4/time_r.m4: New file. * import/time_r.c: New file. * update-gnulib.sh: Import time_r. Change-Id: I53fc861b192940d613ca97f2910b4533c730f667
Diffstat (limited to 'gnulib/configure')
-rw-r--r--gnulib/configure111
1 files changed, 111 insertions, 0 deletions
diff --git a/gnulib/configure b/gnulib/configure
index 9749a49..94d9ff9 100644
--- a/gnulib/configure
+++ b/gnulib/configure
@@ -3564,6 +3564,7 @@ gl_func_list="$gl_func_list __xpg_strerror_r"
gl_func_list="$gl_func_list catgets"
gl_func_list="$gl_func_list snprintf"
gl_header_list="$gl_header_list sys/uio.h"
+gl_func_list="$gl_func_list localtime_r"
gl_func_list="$gl_func_list pipe"
gl_func_list="$gl_func_list iswcntrl"
# Check that the precious variables saved in the cache have kept the same
@@ -5986,6 +5987,7 @@ fi
# Code from module time:
+ # Code from module time_r:
# Code from module unistd:
# Code from module unistd-safer:
# Code from module unsetenv:
@@ -16079,6 +16081,11 @@ $as_echo "$gl_cv_next_time_h" >&6; }
+
+
+
+
+
ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
ac_have_decl=1
@@ -27018,6 +27025,110 @@ $as_echo "$gl_cv_next_sys_uio_h" >&6; }
+ ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
+"
+if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOCALTIME_R $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_localtime_r = no; then
+ HAVE_DECL_LOCALTIME_R=0
+ fi
+
+
+ :
+
+
+
+
+
+ if test $ac_cv_func_localtime_r = yes; then
+ HAVE_LOCALTIME_R=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
+$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
+if ${gl_cv_time_r_posix+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+int
+main ()
+{
+/* We don't need to append 'restrict's to the argument types,
+ even though the POSIX signature has the 'restrict's,
+ since C99 says they can't affect type compatibility. */
+ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+ if (ptr) return 0;
+ /* Check the return type is a pointer.
+ On HP-UX 10 it is 'int'. */
+ *localtime_r (0, 0);
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_time_r_posix=yes
+else
+ gl_cv_time_r_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
+$as_echo "$gl_cv_time_r_posix" >&6; }
+ if test $gl_cv_time_r_posix = yes; then
+ REPLACE_LOCALTIME_R=0
+ else
+ REPLACE_LOCALTIME_R=1
+ fi
+ else
+ HAVE_LOCALTIME_R=0
+ fi
+
+ if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+
+
+ GNULIB_TIME_R=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
+
+
+
+
+
+
+
+
+