Add `extern "C"` blocks to various header files.
#define INCLUDE_ALLOW_VMKERNEL
#include "includeCheck.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/*
* If you want to add a new low-level backdoor call for a guest userland
* application, please consider using the GuestRpc mechanism instead. --hpreg
#endif
+#if defined __cplusplus
+}
#endif
+
+#endif // _BACKDOOR_DEF_H_
#include "vm_basic_types.h"
#include "vm_assert.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
/*
*-----------------------------------------------------------------------------
return TRUE;
}
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // ifndef _CLAMPED_H_
#include "vm_basic_asm.h"
#include "x86cpuid_asm.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
typedef struct CPUID0 {
int numEntries;
return id0Out;
}
+
+#if defined __cplusplus
+} // extern "C"
#endif
+
+#endif // _CPUID_INFO_H
#include "vm_basic_types.h"
#include "vm_basic_defs.h"
+#if defined __cplusplus
+#define LOGLEVEL_EXTERN_C_BEGIN extern "C" {
+#define LOGLEVEL_EXTERN_C_END }
+#else
+#define LOGLEVEL_EXTERN_C_BEGIN
+#define LOGLEVEL_EXTERN_C_END
+#endif
+
+LOGLEVEL_EXTERN_C_BEGIN
+
/*
* CPP variable name hacks
*/
#define LOGLEVEL_EXTENSION_DECLARE(list) \
- VMX86_EXTERN_DATA const int8 *logLevelPtr; \
- VMX86_EXTERN_DATA int LOGLEVEL_EXTOFFSET(LOGLEVEL_EXTENSION); \
- enum { list(LOGLEVEL_MODULEVAR) }
+ LOGLEVEL_EXTERN_C_BEGIN \
+ VMX86_EXTERN_DATA const int8 *logLevelPtr; \
+ VMX86_EXTERN_DATA int LOGLEVEL_EXTOFFSET(LOGLEVEL_EXTENSION); \
+ LOGLEVEL_EXTERN_C_END \
+ enum { list(LOGLEVEL_MODULEVAR) }
#ifdef VMX86_LOG
#endif
+LOGLEVEL_EXTERN_C_END
+
#endif /* _LOGLEVEL_DEFS_H_ */
#include "vm_basic_asm.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
#ifdef MUL64_NO_ASM
/*
*-----------------------------------------------------------------------------
}
#endif
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _MUL64_NOASM_H_
#include "mul64.h"
#endif
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/*
* Locate most and least significant bit set functions. Use our own name
* space to avoid namespace collisions. The new names follow a pattern,
#endif
}
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VM_BASIC_ASM_H_
#define INCLUDE_ALLOW_VMCORE
#include "includeCheck.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
#ifdef VM_X86_64
/*
* The gcc inline asm uses the "A" constraint which differs in 32 & 64
#pragma warning(default: 4035)
#endif
+
+#if defined __cplusplus
+} // extern "C"
#endif
+
+#endif // _VM_BASIC_ASM_X86_H_
#include "vm_basic_types.h" // For INLINE.
#include "vm_basic_asm.h" // For Div64...
+#if defined __cplusplus
+extern "C" {
+#endif
+
static INLINE uint32
RatioOf(uint32 numer1, uint32 numer2, uint32 denom)
#endif // if !defined(_WIN32) && !defined(_WIN64)
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // ifndef _VM_BASIC_MATH_H_
#include <ctype.h>
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/*
* On Windows platform, ctype.h functions are implemented via table lookup,
* and a negative index is unsafe. See bug 83950.
#endif /* _WIN32 */
+
+#if defined __cplusplus
+}
#endif
+
+#endif // _VM_CTYPE_H_
#ifndef _VM_PROCPS_H_
#define _VM_PROCPS_H_
+#if defined __cplusplus
+extern "C" {
+#endif
+
/*
* The getstat() function below makes use of restricted pointers (added in C99)
* and the 'jiff' type.
unsigned int *restrict processes);
extern void meminfo(void);
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // ifndef _VM_PROCPS_H_
#ifndef RC_INVOKED
+#if defined __cplusplus
+extern "C" {
+#endif
+
typedef uint32 ToolsVersion;
typedef enum {
TOOLS_TYPE_UNSET = -1,
comps->minor = (toolsVersion >> 5) & 0x1f;
comps->base = toolsVersion & 0x1f;
}
+
+#if defined __cplusplus
+} // extern "C"
#endif
+#endif // RC_INVOKED
+
/*
* Reserve the highest possible Tools version for Tools whose lifecycle isn't
* to be managed by VMware's platform.
#include "vm_atomic.h"
#include "vm_assert.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
/* Register offsets. */
#define VMCI_STATUS_ADDR 0x00
#define VMCI_CONTROL_ADDR 0x04
typedef VMCIFilterList VMCIProtoFilters[VMCI_FP_MAX];
typedef VMCIProtoFilters VMCIFilters[VMCI_FD_MAX];
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_DEF_H_
#endif // linux && !VMKERNEL
#endif
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/**
* \brief Option name for STREAM socket buffer size.
*
#endif // _WIN32
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_SOCKETS_H_
#include "x86vendor.h"
#include "vm_assert.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/*
* The linux kernel's ptrace.h stupidly defines the bare
* EAX/EBX/ECX/EDX, which wrecks havoc with our preprocessor tricks.
#pragma warning (pop)
#endif
+
+#if defined __cplusplus
+} // extern "C"
#endif
+
+#endif // _X86CPUID_H_
#include "vmci_defs.h"
#include "vmci_call_defs.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
/* VMCI module namespace on vmkernel. */
typedef ssize_t (VMCIQPair_PeekVFct)(VMCIQPair *qpair, void *, size_t, int);
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif /* !__VMCI_KERNELAPI_1_H__ */
#define INCLUDE_ALLOW_VMKERNEL
#include "includeCheck.h"
-
#include "vmciKernelAPI1.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
/* Define version 2. */
typedef int (VMCIDoorbell_NotifyFct)(VMCIHandle, VMCIPrivilegeFlags);
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif /* !__VMCI_KERNELAPI_2_H__ */
#include "vm_basic_types.h"
#include "vmci_defs.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/*
* All structs here are an integral size of their largest member, ie. a struct
* with at least one 8-byte member will have a size that is an integral of 8.
VMCIHandle handle;
} VMCIQueuePairDetachMsg;
+
+#if defined __cplusplus
+} // extern "C"
#endif
+
+#endif // _VMCI_CALL_DEFS_H_
#include "vm_atomic.h"
#include "vm_assert.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
/* Register offsets. */
#define VMCI_STATUS_ADDR 0x00
#define VMCI_CONTROL_ADDR 0x04
typedef VMCIFilterList VMCIProtoFilters[VMCI_FP_MAX];
typedef VMCIProtoFilters VMCIFilters[VMCI_FD_MAX];
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_DEF_H_
#include "vmware.h"
#include "vmci_defs.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
typedef enum {
VMCIOBJ_VMX_VM = 10,
VMCIOBJ_CONTEXT,
return hash & (size - 1);
}
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_INFRASTRUCTURE_H_
#include "vmciKernelAPI.h"
#endif // _WIN32 && WINNT_DDK
+#if defined __cplusplus
+extern "C" {
+#endif
+
/*
*-----------------------------------------------------------------------------
/* Clean up helper macros */
#undef IOCTLCMD
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // ifndef _VMCI_IOCONTROLS_H_
# include "dbllnklst.h"
#endif
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/* Flags for specifying memory type. */
#define VMCI_MEMORY_NORMAL 0x0
#define VMCI_MEMORY_ATOMIC 0x1
# define VMCIList_First(_l) (VMCIList_Empty(_l)?NULL:(_l)->next)
#endif
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_KERNEL_IF_H_
# include "util_copy_dist.h"
#endif
+#if defined __cplusplus
+extern "C" {
+#endif
+
/*
* VMCIQueue
#endif /* Does the O/S support iovec? */
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif /* !_VMCI_QUEUE_H_ */
#include "vm_libc.h"
#endif // VMKERNEL
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
#define VMCI_HANDLE_ARRAY_DEFAULT_SIZE 4
typedef struct VMCIHandleArray {
}
}
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_HANDLE_ARRAY_H_
#ifndef _VMCI_SOCKETS_INT_H_
#define _VMCI_SOCKETS_INT_H_
+#if defined __cplusplus
+extern "C" {
+#endif
+
#if defined(_WIN32)
# if defined(NT_INCLUDED)
#endif // _WIN32
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _VMCI_SOCKETS_INT_H_
#include "vm_basic_defs.h"
#include "vm_assert.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
/*
* constants
*/
ASSERT_ON_COMPILE(sizeof(BalloonBatchPage) == PAGE_SIZE);
)
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif /* _BALLOON_DEF_H */
#include "vm_basic_defs.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
+
#define ETH_LADRF_LEN 2
#define ETH_ADDR_LENGTH 6
return FALSE;
}
+
+#if defined __cplusplus
+} // extern "C"
+#endif
+
#endif // _ETH_PUBLIC_H_
#include "net_sg.h"
#include "vmxnet_def.h"
+#if defined __cplusplus
+extern "C" {
+#endif
+
/*
* Magic number that identifies this version of the vmxnet protocol.
#endif /* defined VMX86_VMX || defined VMKERNEL */
+#if defined __cplusplus
+} // extern "C"
#endif
+#endif // _VMXNET2_DEF_H_