Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-07 09:24:22 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-07 16:39:34 +0300
commit4de8754bac676fc7f29082ccf8281b1c73ce629e (patch)
treea45eb9f1ddbd801106e447cc645a8d34fd26ca36 /newlib/configure
parentad45b86533a47ae33ec99cebc61aee96b57e17a5 (diff)
Change time_t to 64-bit by default
In order to avoid the year 2038 problem, define time_t to a signed integer with at least 64-bits. The type for time_t can be forced to long with the --enable-newlib-long-time_t configure option or with the _USE_LONG_TIME_T system configuration define. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib/configure')
-rwxr-xr-xnewlib/configure26
1 files changed, 24 insertions, 2 deletions
diff --git a/newlib/configure b/newlib/configure
index b2f0b3340..eb4b3b275 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -804,6 +804,7 @@ enable_newlib_unbuf_stream_opt
enable_lite_exit
enable_newlib_nano_formatted_io
enable_newlib_retargetable_locking
+enable_newlib_long_time_t
enable_multilib
enable_target_optspace
enable_malloc_debugging
@@ -1477,6 +1478,7 @@ Optional Features:
--enable-lite-exit enable light weight exit
--enable-newlib-nano-formatted-io Use nano version formatted IO
--enable-newlib-retargetable-locking Allow locking routines to be retargeted at link time
+ --enable-newlib-long-time_t define time_t to long
--enable-multilib build many library versions (default)
--enable-target-optspace optimize for space
--enable-malloc-debugging indicate malloc debugging requested
@@ -2501,6 +2503,19 @@ else
fi
+# Check whether --enable-newlib-long-time_t was given.
+if test "${enable_newlib_long_time_t+set}" = set; then :
+ enableval=$enable_newlib_long_time_t; if test "${newlib_long_time_t+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_long_time_t=yes ;;
+ no) newlib_long_time_t=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-long-time_t option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_nano_malloc=
+fi
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -11807,7 +11822,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11810 "configure"
+#line 11825 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11913,7 +11928,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11916 "configure"
+#line 11931 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12496,6 +12511,13 @@ _ACEOF
fi
+if test "${newlib_long_time_t}" = "yes"; then
+cat >>confdefs.h <<_ACEOF
+#define _WANT_USE_LONG_TIME_T 1
+_ACEOF
+
+fi
+
if test "x${iconv_encodings}" != "x" \
|| test "x${iconv_to_encodings}" != "x" \