]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:util: Define TIME_FIXUP_CONSTANT_INT using INT64_C() macro
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 27 Nov 2023 03:24:00 +0000 (16:24 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 21 Dec 2023 20:21:34 +0000 (20:21 +0000)
This is more portable than using preprocessor conditionals.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/time.c

index c2a77d664d37a21107134cf81950d4389d2ebbda..bfeb6f4a63c6572edf5925d2ad260d7a4e40fc23 100644 (file)
  * @brief time handling functions
  */
 
-#if (SIZEOF_LONG == 8)
-#define TIME_FIXUP_CONSTANT_INT 11644473600L
-#elif (SIZEOF_LONG_LONG == 8)
-#define TIME_FIXUP_CONSTANT_INT 11644473600LL
-#endif
+#define TIME_FIXUP_CONSTANT_INT INT64_C(11644473600)
 
 
 #define NSEC_PER_SEC 1000000000