added macros for extended version numbers
authorHolger Schemel <holger.schemel@virtion.de>
Wed, 27 Nov 2024 20:04:44 +0000 (21:04 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Wed, 27 Nov 2024 18:05:23 +0000 (19:05 +0100)
src/libgame/system.h

index 1b9efd6efef1e5a08bd22b30827402d5a54af68d..9d11cc6dd8e6c4a46b29a2c88a77a85032ad34b4 100644 (file)
 #define VERSION_PART_2(x)              ((VersionSubType)(((x) >> 48) & 0xff))
 #define VERSION_PART_3(x)              ((VersionSubType)(((x) >> 40) & 0xff))
 #define VERSION_PART_4(x)              ((VersionSubType)(((x) >> 32) & 0xff))
+#define VERSION_PART_5(x)              ((VersionSubType)(((x) >> 24) & 0xff))
+#define VERSION_PART_6(x)              ((VersionSubType)(((x) >> 16) & 0xff))
+#define VERSION_PART_7(x)              ((VersionSubType)(((x)) & 0xffff))
 
 #define VERSION_SUPER(x)               VERSION_PART_1(x)
 #define VERSION_MAJOR(x)               VERSION_PART_2(x)
 #define VERSION_MINOR(x)               VERSION_PART_3(x)
 #define VERSION_PATCH(x)               VERSION_PART_4(x)
+#define VERSION_STABLE(x)              VERSION_PART_5(x)
+#define VERSION_EXTRA(x)               VERSION_PART_6(x)
+#define VERSION_BUILD(x)               VERSION_PART_7(x)
 
-#define VERSION_IDENT(a,b,c,d)         (((VersionType)(a) << 56) |     \
+#define VERSION_IDENT_STANDARD(a,b,c,d)        (((VersionType)(a) << 56) |     \
                                         ((VersionType)(b) << 48) |     \
                                         ((VersionType)(c) << 40) |     \
                                         ((VersionType)(d) << 32))
+#define VERSION_IDENT_EXTENDED(e,f,g)  (((VersionType)(e) << 24) |     \
+                                        ((VersionType)(f) << 16) |     \
+                                        ((VersionType)(g)))
+
+#define VERSION_IDENT(a,b,c,d)                 (VERSION_IDENT_STANDARD(a,b,c,d))
+#define VERSION_IDENT_FULL(a,b,c,d, e,f,g)     (VERSION_IDENT_STANDARD(a,b,c,d) |      \
+                                                VERSION_IDENT_EXTENDED(e,f,g))
 
 
 // macros for parent/child process identification