summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-10 15:36:48 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-10 15:36:48 -0500
commit4dc8dc4b89259e1418cd984abe1cd8d8fc6a7496 (patch)
treec7f7ed82a87c1bc8c396689e5954fab6207da451 /src
parent2123f0a2f932f991a5209358a3aae183700c71ab (diff)
parent5f7df92571ec5a2d1eddb257e22f5489acc4fc83 (diff)
downloadtor-4dc8dc4b89259e1418cd984abe1cd8d8fc6a7496.tar.gz
tor-4dc8dc4b89259e1418cd984abe1cd8d8fc6a7496.zip
Merge remote-tracking branch 'public/bug18184'
Diffstat (limited to 'src')
-rw-r--r--src/common/torint.h28
-rw-r--r--src/test/test_dir.c2
-rw-r--r--src/win32/orconfig.h3
3 files changed, 2 insertions, 31 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
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 4824a94132..83a8b8ccc6 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -3312,7 +3312,6 @@ test_dir_download_status_schedule(void *arg)
tt_assert(increment == expected_increment);
tt_assert(dls_failure.next_attempt_at == TIME_MIN + expected_increment);
-#if TIME_T_IS_SIGNED
delay1 = INT_MAX;
increment = download_status_schedule_get_delay(&dls_failure,
schedule,
@@ -3320,7 +3319,6 @@ test_dir_download_status_schedule(void *arg)
expected_increment = delay1;
tt_assert(increment == expected_increment);
tt_assert(dls_failure.next_attempt_at == TIME_MAX);
-#endif
delay1 = 0;
increment = download_status_schedule_get_delay(&dls_attempt,
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index 0c02b19de1..407ffc00fc 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -220,9 +220,6 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS
-/* Define to 1 if time_t is signed. */
-#define TIME_T_IS_SIGNED
-
/* Define to 1 iff unaligned int access is allowed */
#define UNALIGNED_INT_ACCESS_OK