]> granicus.if.org Git - sudo/commitdiff
Move definition of TIME_T_MAX to sudo_util.h
authorTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 24 Sep 2018 20:21:58 +0000 (14:21 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 24 Sep 2018 20:21:58 +0000 (14:21 -0600)
include/sudo_util.h
plugins/sudoers/defaults.c
plugins/sudoers/iolog_util.c
plugins/sudoers/regress/starttime/check_starttime.c

index 41d859900272e7ae3179cd305f4027020a805249..2d3f5f185536e547011bfe41487c6c2a53031483 100644 (file)
 # include "compat/stdbool.h"
 #endif /* HAVE_STDBOOL_H */
 
+#ifndef TIME_T_MAX
+# if SIZEOF_TIME_T == 8
+#  define TIME_T_MAX   LLONG_MAX
+# else
+#  define TIME_T_MAX   INT_MAX
+# endif
+#endif
+
 /*
  * Macros for operating on struct timeval.
  */
index 76e6cb6ad8d92f7b026c0fa4cd29c2dd89976975..eac89e00260e975b0faa57bcca2d29d161ce8305 100644 (file)
@@ -858,14 +858,6 @@ store_uint(const char *str, union sudo_defs_val *sd_un)
     debug_return_bool(true);
 }
 
-#ifndef TIME_T_MAX
-# if SIZEOF_TIME_T == 8
-#  define TIME_T_MAX   LLONG_MAX
-# else
-#  define TIME_T_MAX   INT_MAX
-# endif
-#endif
-
 static bool
 store_timespec(const char *str, union sudo_defs_val *sd_un)
 {
index 79f5e2fae8de985e6f9135263271ed11dad0e6dd..fe11e18b8f38d38e4168ca0661d17389d17e8651 100644 (file)
 #include "sudo_util.h"
 #include "iolog_util.h"
 
-#ifndef TIME_T_MAX
-# if SIZEOF_TIME_T == 8
-#  define TIME_T_MAX   LLONG_MAX
-# else
-#  define TIME_T_MAX   INT_MAX
-# endif
-#endif
-
 static int timing_idx_adj;
 
 struct log_info *
index 15dd1f7bf3e412e0ec16712c30238868a8781c11..e858ad3705ffea348dda1183192ce8e856464a32 100644 (file)
 #include "sudo_fatal.h"
 #include "check.h"
 
-#ifndef TIME_T_MAX
-# if SIZEOF_TIME_T == 8
-#  define TIME_T_MAX    LLONG_MAX
-# else
-#  define TIME_T_MAX    INT_MAX
-# endif
-#endif
-
 __dso_public int main(int argc, char *argv[]);
 
 #ifdef __linux__