]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common header file not applicable to open-vm-tools.
authorKruti Pendharkar <kp025370@broadcom.com>
Tue, 3 Jun 2025 06:30:25 +0000 (23:30 -0700)
committerKruti Pendharkar <kp025370@broadcom.com>
Tue, 3 Jun 2025 06:30:25 +0000 (23:30 -0700)
open-vm-tools/lib/include/vm_basic_types.h

index 569675862e301ce14bf49e17f9199120b0aeb9de..49ca98b5a23d14bb659040d76f9ec4ecef339726 100644 (file)
@@ -427,22 +427,25 @@ typedef int64 VmTimeVirtualClock;  /* Virtual Clock kept in CPU cycles */
  * Suffix for 64-bit constants.  Use it like this:
  *    CONST64(0x7fffffffffffffff) for signed or
  *    CONST64U(0x7fffffffffffffff) for unsigned.
+ *
+ * Only use with literal constants.
+ * It might not do the right thing with an expression.
  */
 
 #if !defined(CONST64) || !defined(CONST64U)
 #ifdef _MSC_VER
-#define CONST64(c) c##I64
-#define CONST64U(c) c##uI64
+#define CONST64(c) (c##I64)
+#define CONST64U(c) (c##uI64)
 #elif defined __APPLE__
-#define CONST64(c) c##LL
-#define CONST64U(c) c##uLL
+#define CONST64(c) (c##LL)
+#define CONST64U(c) (c##uLL)
 #elif __GNUC__
 #if defined(VM_X86_64) || defined(VM_ARM_64)
-#define CONST64(c) c##L
-#define CONST64U(c) c##uL
+#define CONST64(c) (c##L)
+#define CONST64U(c) (c##uL)
 #else
-#define CONST64(c) c##LL
-#define CONST64U(c) c##uLL
+#define CONST64(c) (c##LL)
+#define CONST64U(c) (c##uLL)
 #endif
 #else
 #error - Need compiler define for CONST64