]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common header files not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Mon, 9 Nov 2020 20:29:03 +0000 (12:29 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Mon, 9 Nov 2020 20:29:03 +0000 (12:29 -0800)
open-vm-tools/lib/include/vm_assert.h
open-vm-tools/lib/include/vm_basic_defs.h

index ddcf673c36c62ea975e2486288f7bb636e10796c..1c8d0590e8d73e0a5b5934e233ec674b8dac7e10 100644 (file)
@@ -80,6 +80,7 @@
 
 // XXX not necessary except some places include vm_assert.h improperly
 #include "vm_basic_types.h"
+#include <stdarg.h>
 
 #ifdef __cplusplus
 extern "C" {
index cea89a1443e765502b3d6089744990307221f043..980f1ff320a02fecd1d4df9ba72bc2df6c1cf86b 100644 (file)
@@ -169,6 +169,15 @@ Max(int a, int b)
 #define ROUNDUPBITS(x, bits)   (((uintptr_t) (x) + MASK(bits)) & ~MASK(bits))
 #define ROUNDDOWNBITS(x, bits) ((uintptr_t) (x) & ~MASK(bits))
 #define CEILING(x, y)          (((x) + (y) - 1) / (y))
+
+#if defined VMKERNEL || defined VMKBOOT
+# define CEIL(_a, _b)        CEILING(_a, _b)
+# define FLOOR(_a, _b)       ((_a)/(_b))
+# define ALIGN_DOWN(_a, _b)  ROUNDDOWN(_a, _b)
+# define ALIGN_UP(_a, _b)    ROUNDUP(_a, _b)
+# define IS_ALIGNED(_a, _b)  (ALIGN_DOWN(_a, _b) == _a)
+#endif
+
 #if defined __APPLE__
 #include <machine/param.h>
 #undef MASK