]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
More C++ happiness
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)
Add extern "C" to header files.

35 files changed:
open-vm-tools/lib/include/dbllnklst.h
open-vm-tools/lib/include/dictll.h
open-vm-tools/lib/include/dynarray.h
open-vm-tools/lib/include/dynbuf.h
open-vm-tools/lib/include/dynxdr.h
open-vm-tools/lib/include/err.h
open-vm-tools/lib/include/escape.h
open-vm-tools/lib/include/file.h
open-vm-tools/lib/include/fileIO.h
open-vm-tools/lib/include/fileLock.h
open-vm-tools/lib/include/glibUtils.h
open-vm-tools/lib/include/hashMap.h
open-vm-tools/lib/include/hashTable.h
open-vm-tools/lib/include/hgfsServer.h
open-vm-tools/lib/include/hgfsServerManager.h
open-vm-tools/lib/include/hgfsServerPolicy.h
open-vm-tools/lib/include/hostType.h
open-vm-tools/lib/include/hostinfo.h
open-vm-tools/lib/include/impersonate.h
open-vm-tools/lib/include/ioplGet.h
open-vm-tools/lib/include/iovector.h
open-vm-tools/lib/include/localconfig.h
open-vm-tools/lib/include/log.h
open-vm-tools/lib/include/logFixed.h
open-vm-tools/lib/include/memaligned.h
open-vm-tools/lib/include/miscSolaris.h
open-vm-tools/lib/include/msg.h
open-vm-tools/lib/include/msgList.h
open-vm-tools/lib/include/msgfmt.h
open-vm-tools/lib/include/msgid.h
open-vm-tools/lib/include/mutexRank.h
open-vm-tools/lib/include/mutexRankLib.h
open-vm-tools/modules/shared/vmmemctl/dbllnklst.h
open-vm-tools/services/plugins/dndcp/dnd/dnd.h
open-vm-tools/services/plugins/dndcp/dnd/dndMsg.h

index 2bec9eb4372515d1b7725168e95df3cb2f52af1e..df8e9ce131441cb5f929d7644d110ec093e4252b 100644 (file)
 
 #include "vm_basic_types.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define DblLnkLst_OffsetOf(type, field) ((intptr_t)&((type *)0)->field)
 
 #define DblLnkLst_Container(addr, type, field) \
@@ -325,5 +329,8 @@ DblLnkLst_Swap(DblLnkLst_Links *head1,  // IN/OUT
    }
 }
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* _DBLLNKLST_H_ */
index 3f0201822e86c5501c70644733d822de26a4898f..a51d57bcc65ab17afc2eeb319ca8ab9d42a6a8d4 100644 (file)
 #ifndef __DICTLL_H__
 #   define __DICTLL_H__
 
-
 #include "vm_basic_types.h"
 #include "dynbuf.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 int
 DictLL_ReadLine(FILE *stream,  // IN
                 char **line,   // OUT
@@ -56,5 +59,8 @@ DictLL_MarshalLine(DynBuf *output,     // IN/OUT
 Bool
 DictLL_ReadUTF8BOM(FILE *file); // IN/OUT
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* __DICTLL_H__ */
index 154795e2ecaccb5d19f30649aff2fc0119ca9935..2a75af2df73805c44eb938cee00642ca9e9b2033 100644 (file)
@@ -32,6 +32,9 @@
 #include "vm_basic_types.h"
 #include "vm_assert.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 typedef struct DynArray {
    DynBuf buf;
@@ -338,4 +341,8 @@ DynArray_Copy(DynArray *src,        // IN
 /* Define DynArray of DynBuf. */
 DEFINE_DYNARRAY_TYPE(DynBuf)
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _DYNARRAY_H_ */
index eb4e99162ab1d93fa5d9f97c8dcb460674f0dd5a..b5f933b8205045727607f9bc2f3e83facb18ca12 100644 (file)
@@ -29,6 +29,9 @@
 #include "vm_basic_types.h"
 #include "vm_assert.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 typedef struct DynBuf {
    char   *data;
@@ -237,5 +240,8 @@ DynBuf_AppendString(DynBuf *buf,         // IN/OUT
    return DynBuf_Append(buf, string, strlen(string) + 1);
 }
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* __DYNBUF_H__ */
index 5410375cfc6b0a1e498fa3bbc6a4257e363e8eff..53587d4b3028b9a1e21a37bcfb3fc943de5100e3 100644 (file)
 #include <rpc/xdr.h>
 #include "vm_basic_types.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 XDR *DynXdr_Create(XDR *in);
 Bool DynXdr_AppendRaw(XDR *xdrs, const void *buf, size_t len);
 void *DynXdr_AllocGet(XDR *xdrs);
 void *DynXdr_Get(XDR *xdrs);
 void DynXdr_Destroy(XDR *xdrs, Bool release);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _DYNXDR_H_ */
 
index 49bc5a0bc58864b9d39df35307109ad8175b8bf9..a28487dab27c521813022cf5421c07c206911e7f 100644 (file)
 #ifndef _ERR_H_
 #define _ERR_H_
 
-#if !defined(_WIN32)
-#include <errno.h>
-#endif
-
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
-
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
+#if !defined(_WIN32)
+#include <errno.h>
+#endif
+
 #if defined(_WIN32)
    typedef DWORD Err_Number;
 #else
@@ -129,8 +128,8 @@ char *Err_SanitizeMessage(const char *msg);
       Err_SetErrno(e); \
    } while (FALSE)
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif
index ee81d95cb6b6dac896d919a95eef0d2970ca82a7..3b478681e10d63e1b58cc3882cd70483f752ec27 100644 (file)
 
 #include "vmware.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 void *
 Escape_DoString(const char *escStr,    // IN
                 int const *bytesToEsc, // IN
@@ -84,5 +88,8 @@ Escape_UnescapeCString(char *buf); // IN/OUT
 char *
 Escape_Comma(const char *string); // IN
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* __ESCAPE_H__ */
index 05f91f2489c827fd31ceb4bfde59bc325a318047..b714ebaf4a2d6275534f90bc794c51c14b21d85d 100644 (file)
 #ifndef _FILE_H_
 #define _FILE_H_
 
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-#include <stdio.h>
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
+#include <stdio.h>
+
 #include "fileIO.h"
 #include "unicodeTypes.h"
 #include "err.h"
@@ -52,6 +49,10 @@ extern "C"{
 #define FILE_MAXPATH   PATH_MAX
 #endif
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define FILE_SEARCHPATHTOKEN ";"
 
 
@@ -406,8 +407,8 @@ int File_MakeSafeTemp(const char *tag,
 
 Bool File_DoesVolumeSupportAcls(const char *pathName);
 
-#ifdef __cplusplus
-} // extern "C" {
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // ifndef _FILE_H_
index 0dcda432b1127120f8cede8b3feb933da39deb08..889ef23d3f998c392b82b269d69e885251a31b24 100644 (file)
 #ifndef _FILEIO_H_
 #define _FILEIO_H_
 
-#ifdef __cplusplus
-extern "C"{
-#endif
-
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
@@ -56,6 +52,10 @@ extern "C"{
 
 #include "iovector.h"        // for struct iovec
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 struct FileLockToken;
 
 #if defined(_WIN32)
@@ -484,8 +484,8 @@ Bool FileIO_IsSuccess(FileIOResult res);
 Bool FileIO_SupportsPrealloc(const char *pathName,
                              Bool fsCheck);
 
-#ifdef __cplusplus
-} // extern "C" {
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // _FILEIO_H_
index 5317ae6c191cf7663f6d775eb16460d0c9bdf711..185a6e48a544881f1c0fbce01ef4ae48a0ea254c 100644 (file)
 #include "unicodeTypes.h"
 #include "msgList.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 // The default time, in msec, to wait for a lock before giving up
 #define        FILELOCK_DEFAULT_WAIT 2500
 
@@ -78,4 +82,8 @@ Bool FileLock_CleanupVM(const char *cfgfilePath,
 int FileLock_LockDevice(const char *device);
 Bool FileLock_UnlockDevice(const char *device);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // ifndef _FILELOCK_H_
index f6268f771fba387007d752fb92f821c205ba16aa..bf0ecf1a021b56310a8428a6b6ea73594241874e 100644 (file)
 #ifndef _GLIBUTILS_H_
 #define _GLIBUTILS_H_
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /**
  * @file glibUtils.h
  *
@@ -82,4 +86,8 @@ GlibUtils_CreateSysLogger(const char *domain,
 
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _GLIBUTILS_H_ */
index bb75d32db695edc5536a9efb243a928b0dcb35a5..a189d34e3a39f43acd2a074b587af394f8435a01 100644 (file)
 #include "aioMgr.h"
 #endif
 
-typedef struct HashMap HashMap;
-
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
+typedef struct HashMap HashMap;
 
 /*
  * ----------------------------------------------------------------------------
@@ -79,8 +78,8 @@ void HashMap_Iterate(HashMap* map, HashMapIteratorFn mapFn, Bool clear,
       void *userData);
 Bool HashMap_DoTests(void);
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif /* _HASHMAP_H_ */
index 95a025f831902172b39b5f6f9181bb9fb306def4..bc24b53d125689c63e160fdc397a6029f817b0a6 100644 (file)
@@ -33,6 +33,9 @@
 #include "vm_basic_defs.h"
 #include "vm_atomic.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 typedef struct HashTable HashTable;
 typedef struct PtrHashTable PtrHashTable;
@@ -177,4 +180,8 @@ Bool PtrHash_Insert(PtrHashTable *hashTable,
 Bool PtrHash_Delete(PtrHashTable *hashTable,
                     const void *keyPtr);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif
index fbaf1314f1583072ffd7d56e144d3424beb7f378..abf69c64a5b0d01aa9f6064e9b1cc972a8f3d617 100644 (file)
 #include "hgfs.h"             /* for HGFS_PACKET_MAX */
 #include "dbllnklst.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 typedef struct HgfsVmxIov {
    void *va;           /* Virtual addr */
    uint64 pa;          /* Physical address passed by the guest */
@@ -209,4 +213,8 @@ void HgfsServer_SetHandleCounter(uint32 newHandleCounter);
 
 void HgfsServer_Quiesce(Bool freeze);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _HGFS_SERVER_H_
index 6a78921f2afc09103d7d21102433298a57fa6f37..87c3b76166ee356c4b335fad0a18d36017c3298b 100644 (file)
 #ifndef _HGFS_SERVER_MANAGER_H_
 # define _HGFS_SERVER_MANAGER_H_
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * hgfsServerManager.h --
  *
@@ -63,4 +67,8 @@ Bool HgfsServerManager_ProcessPacket(HgfsServerMgrData *mgrData,
 uint32 HgfsServerManager_InvalidateInactiveSessions(HgfsServerMgrData *mgrData);
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _HGFS_SERVER_MANAGER_H_
index 4a5e6fbb5121c7b3cdb1a295891db40aa8d0e9b1..e84c403d9a08a3ed72ada9a2c80af17624b91d3c 100644 (file)
 #include "cpName.h"
 #include "hgfsServer.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * Name of share that corresponds to the root of the server's
  * filesystem.
@@ -112,4 +116,8 @@ HgfsServerPolicy_FreeShareList(HgfsServerPolicy_ShareList *shareList); // IN: li
 HgfsServerPolicy_ShareList *
 HgfsServerPolicy_GetSharesWithTag(const char *tag); // IN: tag to search for
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _HGFS_SERVER_POLICY_H_
index 69b6bae53a9aec6e5af14c2cf4729f40fa3370e0..22cc4ea41c5ed292de522a6207031667e204c66c 100644 (file)
 
 #include "vm_basic_types.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 Bool HostType_OSIsVMK(void);
 Bool HostType_OSIsSimulator(void);
 
 /* Old name. TODO: remove */
 static INLINE Bool
 HostType_OSIsPureVMK(void)
-{ return HostType_OSIsVMK(); }
+{
+   return HostType_OSIsVMK();
+}
+
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* ifndef _HOSTTYPE_H_ */
index 199f108318fb3eee6c2af64fe4a88dcacc1d3920..64cdc2848681cf9484d25468a10202a7609cd5c6 100644 (file)
 #include "x86cpuid.h"
 #include "unicodeTypes.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 typedef enum {
    HOSTINFO_PROCESS_QUERY_DEAD,    // Procss is dead (does not exist)
    HOSTINFO_PROCESS_QUERY_ALIVE,   // Process is alive (does exist)
@@ -236,4 +240,8 @@ size_t Hostinfo_GetKernelZoneElemSize(char const *name);
 char *Hostinfo_GetHardwareModel(void);
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* ifndef _HOSTINFO_H_ */
index 59a0661a681dfe8b9ea047814d8f1ad0dd518f65..7dcdba35e6e22fc3a555f850a872be1f200edf5a 100644 (file)
 
 #define INCLUDE_ALLOW_USERLEVEL
 #include "includeCheck.h"
+
 #include "auth.h"
 
-extern void Impersonate_Init(void);
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+void Impersonate_Init(void);
 
-extern Bool Impersonate_Owner(const char *file);
-extern Bool Impersonate_Do(const char *user, AuthToken token);
-extern Bool Impersonate_Undo(void);
-extern char *Impersonate_Who(void);
+Bool Impersonate_Owner(const char *file);
+Bool Impersonate_Do(const char *user, AuthToken token);
+Bool Impersonate_Undo(void);
+char *Impersonate_Who(void);
 
-extern Bool Impersonate_ForceRoot(void);
-extern Bool Impersonate_UnforceRoot(void);
+Bool Impersonate_ForceRoot(void);
+Bool Impersonate_UnforceRoot(void);
 
-extern Bool Impersonate_Runas(const char *cfg, const char *caller, 
-                              AuthToken callerToken);
+Bool Impersonate_Runas(const char *cfg, const char *caller, 
+                       AuthToken callerToken);
 
 #ifdef _WIN32
-extern Bool Impersonate_CfgRunasOnly(const char *cfg);
+Bool Impersonate_CfgRunasOnly(const char *cfg);
+#endif
+
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // ifndef _IMPERSONATE_H_
index 68015ac03bbdecbde5cc36e24d92a7ec02caca5f..4c55dcf46ec9885153f2858839b55a55b2e1b924 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2012 VMware, Inc. All rights reserved.
+ * Copyright (C) 2012-2016 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
 #include "x86_basic_defs.h"
 #include "vm_basic_asm.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define Iopl_Get() ((GetCallerEFlags() >> EFLAGS_IOPL_SHIFT) && 0x3)
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif
index 8a9a7a8bbe0b810d0646b3eea4624472288bef40..6f02b94917e652c76ea8de5831cd21ba4ff72329 100644 (file)
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * Ugly definition of struct iovec.
  */
@@ -139,4 +143,8 @@ void IOV_Assert(struct iovec *iov,       // IN: iovector
 #define IOV_ASSERT(IOVEC, NUM_ENTRIES) ((void) 0)
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* #ifndef _IOVECTOR_H_ */
index 94d5944c5bc93fece2dda83b89bf598de1a932ba..db08658d8dbd149436b60c9a43a9683d75bd030e 100644 (file)
 
 #include "preference.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define LocalConfig_GetBool Preference_GetBool
 #define LocalConfig_GetTriState Preference_GetTriState
 #define LocalConfig_GetLong Preference_GetLong
 #define LocalConfig_GetString Preference_GetString
 #define LocalConfig_GetPathName Preference_GetPathName
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif
index 94e39d2a61a7b8de69a0ce4e0c8e563d2ae300c1..51c2425b2d99328a983c3c9376b510d3c9e5ede5 100644 (file)
 
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
-
 #include "includeCheck.h"
-#include "productState.h"
 
+#include "productState.h"
 #include <stdarg.h>
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 
 /*
  * The bora/lib Log Facility log level model.
@@ -392,4 +395,9 @@ void Log_Histogram(uint32 n,
                    int limit);
 
 #endif /* !VMM */
+
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* VMWARE_LOG_H */
index 6cfd0242daf6a351b61c14b16524574b2f94da3b..c68981cf3e7cf425f13910f5770fedf7375427fa 100644 (file)
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  *  LogFixed_Base2 and LogFixed_Base10 provide their values expressed
  *  as a ration of two uint32 numbers with an accuracy of better than 1%.
@@ -39,4 +43,8 @@ void LogFixed_Base10(uint64 value,
                     uint32 *numerator,
                     uint32 *denominator);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif  // _LOGFIXED_H_
index a72248eb74fa869cd49286e985c106817a5d5266..61409f5d33b50162991ef0c9328104e55d7fc893 100644 (file)
 #endif
 #include "vmware.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #if defined __APPLE__ && !vm_x86_64
 /*
  * Bug 471584: Mac OS X 10.6's valloc() implementation for 32-bit
@@ -381,4 +385,8 @@ Aligned_Realloc(void *buf,   // IN
 #endif
 }
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif
index 24ed3ac530c57128258d587853a140c471bda9aa..cc2e52c067b9baf03e8753c1f1d01b06055adac0 100644 (file)
 
 #define INCLUDE_ALLOW_USERLEVEL
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 int
 daemon(int nochdir, int noclose);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif  /* _MISCSOLARIS_H_ */
 
 
index a196bf6b2620e9e884836c38c8b01b149810cf6e..44abe0e90d02fa277c0ca9fb3472066770851433 100644 (file)
 #include "voblib.h"
 #endif
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 
 #define INVALID_MSG_CODE (-1)
 
@@ -267,4 +271,8 @@ void Msg_GetThreadCallback(MsgCallback *cb);
 const char *Msg_HResult2String(long hr);
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // ifndef _MSG_H_
index 4e445028836dd8ecd37863817392d2424c3e095b..de08515803a8ef79d459e713cba1b2430a40d8c8 100644 (file)
 #include "msgid.h"
 #include "msgfmt.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 
 /*
  * Data structures, types, and constants
@@ -72,4 +76,8 @@ const char *MsgList_GetMsgID(const MsgList *messages);
 
 Bool MsgList_Present(const MsgList *messages);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // ifndef _MSGLIST_H_
index b31ddbf0660b0764928e382aaac6dfb40ac0ac00..cf2f0bbdc9cf606cd110baac6f725ed7e1950984 100644 (file)
 #include "str.h" // for HAS_BSD_PRINTF
 #endif
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 
 /*
  * Format parser callback functions
@@ -181,5 +185,8 @@ int MsgFmt_Snprintf(char *buf, size_t size, const char *format,
 char *MsgFmt_Asprintf(size_t *length, const char *format,
                       const MsgFmt_Arg *args, int numArgs);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif // ifndef _MSGFMT_H_
index 3ef2bf1503e9419374791f8328f0ac90e2b37e18..8e1eb257d6c38dda69366a2985f745c5acf76e33 100644 (file)
 #define INCLUDE_ALLOW_VMCORE
 #define INCLUDE_ALLOW_VMKERNEL
 #include "includeCheck.h"
-#include "msgid_defs.h"
 
+#include "msgid_defs.h"
 #include "vm_basic_defs.h"
 
 #ifndef VMKERNEL
 #include <string.h>
 #endif
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 
 // the X hides MSG_MAGIC so it won't appear in the object file
 #define MSG_MAGICAL(s) \
@@ -104,5 +108,8 @@ Msg_StripMSGID(const char *idString)    // IN
    return idString;
 }
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif // ifndef _MSGID_H_
index 1d7eb03a7c756cf9eabb0d2142114d16e927cf43..2a1817cc53fcdd957d8de8a6678a031c6b6e5dec 100644 (file)
 
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
-
 #include "includeCheck.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * Core rank defines.
  *
  */
 #define RANK_libLockBase         0xF0000000
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // ifndef _MUTEXRANK_H_
index 3726c1ffd770a9432c0443063a0fd284561fc8b7..ee5f1ad1bdf6c550d022578a4f82da7ed4fe7985 100644 (file)
 
 #include "mutexRank.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * MXUser mutex ranks for bora/lib code.
  *
 #define RANK_licenseCheckLock        (RANK_libLockBase + 0x7090)
 #define RANK_preferenceLock          (RANK_libLockBase + 0x7100)
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* _LIBMUTEXRANK_H */
index 2bec9eb4372515d1b7725168e95df3cb2f52af1e..df8e9ce131441cb5f929d7644d110ec093e4252b 100644 (file)
 
 #include "vm_basic_types.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define DblLnkLst_OffsetOf(type, field) ((intptr_t)&((type *)0)->field)
 
 #define DblLnkLst_Container(addr, type, field) \
@@ -325,5 +329,8 @@ DblLnkLst_Swap(DblLnkLst_Links *head1,  // IN/OUT
    }
 }
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* _DBLLNKLST_H_ */
index 38197a8992629239d06047dbc08fb1d2c925ae5f..f9499572ba2f2c99c49995d33f7a33f1a55d255d 100644 (file)
 #define _DND_H_
 
 #define INCLUDE_ALLOW_USERLEVEL
+#include "includeCheck.h"
 
 #ifdef _WIN32
 #   include <windows.h>
 #   include <shellapi.h>
 #endif
 
-#include "includeCheck.h"
 #include "vm_basic_types.h"
 #include "unicodeTypes.h"
 #include "dynarray.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /* Error value returned when data contains illegal characters */
 #define DND_ILLEGAL_CHARACTERS  "data contains illegal characters"
 /*
@@ -311,4 +315,8 @@ size_t DnD_TransportReqPacket(DnDTransportBuffer *buf,
                               DnDTransportPacketHeader **packet);
 #endif // !SWIG
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _DND_H_
index 365ab024fada4a74c0637646a54df33088747cbf..e0dbf7023eb3b4d38bd3e9347264b5474d556cc0 100644 (file)
 #define _DNDMSG_H_
 
 #define INCLUDE_ALLOW_USERLEVEL
-
 #include "includeCheck.h"
+
 #include "vm_basic_types.h"
 
 #include "dynbuf.h"
 #include "dynarray.h"
 #include "dnd.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /* Various return types serialization/unserialization functions can return. */
 
 typedef enum {
@@ -157,4 +161,8 @@ Bool DnDMsg_Serialize(DnDMsg *msg, DynBuf *buf);
 DnDMsgErr DnDMsg_UnserializeHeader(DnDMsg *msg, void *buf, size_t len);
 DnDMsgErr DnDMsg_UnserializeArgs(DnDMsg *msg, void *buf, size_t len);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _DNDMSG_H_ */