aboutsummaryrefslogtreecommitdiff
path: root/src/common/torint.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-01-29 09:18:59 -0500
committerNick Mathewson <nickm@torproject.org>2016-01-29 09:18:59 -0500
commit5f7df92571ec5a2d1eddb257e22f5489acc4fc83 (patch)
tree9ef43ebc29ec04a5fe42f2411b3aa61ac2f643c8 /src/common/torint.h
parenta5bed4dab2f8521f744d5137e4f439b073c7e5e9 (diff)
downloadtor-5f7df92571ec5a2d1eddb257e22f5489acc4fc83.tar.gz
tor-5f7df92571ec5a2d1eddb257e22f5489acc4fc83.zip
Remove support for unsigned time_t
We've never actually tested this support, and we should probably assume it's broken. To the best of my knowledge, only OpenVMS has this, and even on OpenVMS it's a compile-time option to disable it. And I don't think we build on openvms anyway. (Everybody else seems to be working around the 2038 problem by using a 64-bit time_t, which won't expire for roughly 292 billion years.) Closes ticket 18184.
Diffstat (limited to 'src/common/torint.h')
-rw-r--r--src/common/torint.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/common/torint.h b/src/common/torint.h
index 418fe0fabf..480ba1a596 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -312,8 +312,6 @@ typedef uint32_t uintptr_t;
#ifndef TIME_MAX
-#ifdef TIME_T_IS_SIGNED
-
#if (SIZEOF_TIME_T == SIZEOF_INT)
#define TIME_MAX ((time_t)INT_MAX)
#elif (SIZEOF_TIME_T == SIZEOF_LONG)
@@ -321,25 +319,13 @@ typedef uint32_t uintptr_t;
#elif (SIZEOF_TIME_T == 8)
#define TIME_MAX ((time_t)INT64_MAX)
#else
-#error "Can't define (signed) TIME_MAX"
+#error "Can't define TIME_MAX"
#endif
-#else
-/* Unsigned case */
-#if (SIZEOF_TIME_T == 4)
-#define TIME_MAX ((time_t)UINT32_MAX)
-#elif (SIZEOF_TIME_T == 8)
-#define TIME_MAX ((time_t)UINT64_MAX)
-#else
-#error "Can't define (unsigned) TIME_MAX"
-#endif
-#endif /* time_t_is_signed */
#endif /* ifndef(TIME_MAX) */
#ifndef TIME_MIN
-#ifdef TIME_T_IS_SIGNED
-
#if (SIZEOF_TIME_T == SIZEOF_INT)
#define TIME_MIN ((time_t)INT_MIN)
#elif (SIZEOF_TIME_T == SIZEOF_LONG)
@@ -347,19 +333,9 @@ typedef uint32_t uintptr_t;
#elif (SIZEOF_TIME_T == 8)
#define TIME_MIN ((time_t)INT64_MIN)
#else
-#error "Can't define (signed) TIME_MIN"
+#error "Can't define TIME_MIN"
#endif
-#else
-/* Unsigned case */
-#if (SIZEOF_TIME_T == 4)
-#define TIME_MIN ((time_t)UINT32_MIN)
-#elif (SIZEOF_TIME_T == 8)
-#define TIME_MIN ((time_t)UINT64_MIN)
-#else
-#error "Can't define (unsigned) TIME_MIN"
-#endif
-#endif /* time_t_is_signed */
#endif /* ifndef(TIME_MIN) */
#ifndef SIZE_MAX