]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
macro-fundamental: add U64_{K,M,G}B
authorMike Yuan <me@yhndnzj.com>
Wed, 13 Dec 2023 11:25:40 +0000 (19:25 +0800)
committerMike Yuan <me@yhndnzj.com>
Wed, 13 Dec 2023 12:42:05 +0000 (20:42 +0800)
src/fundamental/macro-fundamental.h
src/libsystemd/sd-journal/journal-file.c

index 797330dd97d6cabb2da7fc30fcb9999afc3b804f..041649a03bca54ba0f3ff684a48d2c9433dcf708 100644 (file)
                 __atomic_exchange_n(&(o), true, __ATOMIC_SEQ_CST); \
         })
 
+#define U64_KB UINT64_C(1024)
+#define U64_MB (UINT64_C(1024) * U64_KB)
+#define U64_GB (UINT64_C(1024) * U64_MB)
+
 #undef MAX
 #define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b))
 #define __MAX(aq, a, bq, b)                             \
index 2812eb386a220f6c40f575984573891a3d50a0d4..cef59c8944ed337ba1b551407506faf4833c3a3d 100644 (file)
 #define DEFAULT_COMPRESS_THRESHOLD (512ULL)
 #define MIN_COMPRESS_THRESHOLD (8ULL)
 
-#define U64_KB UINT64_C(1024)
-#define U64_MB (UINT64_C(1024) * U64_KB)
-#define U64_GB (UINT64_C(1024) * U64_MB)
-
 /* This is the minimum journal file size */
 #define JOURNAL_FILE_SIZE_MIN (512 * U64_KB)             /* 512 KiB */
 #define JOURNAL_COMPACT_SIZE_MAX ((uint64_t) UINT32_MAX) /* 4 GiB */