From: Kruti Pendharkar Date: Tue, 3 Jun 2025 06:30:25 +0000 (-0700) Subject: Change to common header file not applicable to open-vm-tools. X-Git-Tag: stable-13.1.0~177 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4294b075cff1f8240cc717650b9a41a62ec85ee;p=thirdparty%2Fopen-vm-tools.git Change to common header file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index 569675862..49ca98b5a 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -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