]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
More C++ goodness
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)
12 files changed:
open-vm-tools/lib/include/vixCommands.h
open-vm-tools/lib/include/vixOpenSource.h
open-vm-tools/lib/include/vmSessionId.h
open-vm-tools/lib/include/vmblock.h
open-vm-tools/lib/include/vmblock_user.h
open-vm-tools/lib/include/vmfs.h
open-vm-tools/lib/include/vmstdio.h
open-vm-tools/lib/include/vmsupport.h
open-vm-tools/lib/include/vmxrpc.h
open-vm-tools/lib/include/vthreadBase.h
open-vm-tools/lib/include/xdrutil.h
open-vm-tools/libguestlib/vmGuestLibInt.h

index b25ce416c456e7010809bf1330bc538a931e61dc..777738969187e1edb93e588fba22bd825d2e93ce 100644 (file)
 
 #include "vixOpenSource.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * These describe the format of the message objects.
  * This will change when the client/vmx support different
@@ -2662,8 +2666,9 @@ __VMAutomationMsgParserGetPropertyList(const char *caller,
 
 #endif   // VIX_HIDE_FROM_JAVA
 
-
-
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif // _VIX_COMMANDS_H_
 
index f03cdfb7ccb9edf3a3c31c9fb92436a52bb937eb..3c3cef222b720d0aff8466de4c3d5969cb1ae07b 100644 (file)
@@ -30,8 +30,8 @@
 #ifndef _VIXOpenSource_h_
 #define _VIXOpenSource_h_
 
-#ifdef __cplusplus
-extern "C"{
+#if defined(__cplusplus)
+extern "C" {
 #endif
 
 /*
@@ -766,11 +766,10 @@ extern VixError VixLogError(VixError err, const char *function, int line,
 
 #endif   // VIX_HIDE_FROM_JAVA
 
-#ifdef __cplusplus
-} // extern "C" {
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
-
 #endif // _VIXOpenSource_h_
 
 
index ec5146e71d70f751e113cc2ac7f63c6fd85aa474..99bd5bafc82bd7bab74a941a0416ee9c51d4a386 100644 (file)
 #ifndef _VM_SESSION_ID_H_
 #define _VM_SESSION_ID_H_
 
-
 #include "vm_basic_types.h"
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
 typedef uint64 VMSessionId;
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif /* _VM_SESSION_ID_H_ */
index 2c9be1613078129764711208b12d0e463561a134..a8631bd94c225c53202025279f55ad4a5ea88575 100644 (file)
@@ -91,6 +91,9 @@
 # include <sys/param.h>
 #endif
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 /*
  * FUSE definitions. They are supposed to be used by userspace code and
 # error "Unknown platform for vmblock."
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _VMBLOCK_H_ */
index dab81658c134252765bdb54b68ff7962c0bfa9ee..cc7cf6607bd151093c8dbfebffe69b8914163350 100644 (file)
 #include "vm_basic_types.h"
 #include "vmblock.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 static INLINE int
 VMBLOCK_CONTROL_FUSE(int fd,            // IN
                      char op,           // IN
@@ -159,4 +163,8 @@ VMBLOCK_CONTROL(int fd, int cmd, const char *path)
 
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _VMBLOCK_USER_H_
index 64bf310131bc93cdd0468c3a8c1b29bad9445e08..23265072cec4056fddc11aaca4483447b06c17ba 100644 (file)
@@ -1,4 +1,3 @@
-
 /*********************************************************
  * Copyright (C) 2003-2016 VMware, Inc. All rights reserved.
  *
 
 #include "unicodeTypes.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 // Consolidate all path stuff here so it's consistent between user and kernel
 #define VMFS_ROOT_DIR_NAME              "vmfs"
 #define VMFS_ROOT_DIR_PATH              "/vmfs/"
@@ -109,5 +112,9 @@ typedef enum {
 char *Vmfs_GetCOSFileName(const char *vmfsFile);
 #endif /* VM86_SERVER */
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* __VMFS_H__ */
 
index 646b7fa7558975335ec9303c92354593677faa19..ece66d7eda782662cbb41ec5ce5c7d772f43b4f8 100644 (file)
 
 #include <stdio.h>
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 typedef enum {
    StdIO_Error,
    StdIO_EOF,
@@ -40,5 +44,8 @@ StdIO_ReadNextLine(FILE *stream,         // IN
                    size_t maxBufLength,  // IN
                    size_t *count);       // OUT
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* __VMSTDIO_H__ */
index 5393b36f9f4beec721f0a3540f58fa00c525165a..2d37031922f34feb4a416da3d87447c0f1ecc048 100644 (file)
 #ifndef _VMSUPPORT_H_
 #define _VMSUPPORT_H_
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * The status of vm-support tool running in the guest, exported in VMDB at:
  * vm/#/vmx/guestTools/vmsupport/gStatus
@@ -55,4 +59,8 @@ typedef enum {
 #define RPC_VMSUPPORT_START   "vmsupport.start"
 #define RPC_VMSUPPORT_STATUS  "tools.vmsupport.status"
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _VMSUPPORT_H_
index 0940ebfd148e92d2f6c3cfd62076e9644596f37c..6bf4da91a3339bcfcd3a4a46d28c3e1bb9c74519 100644 (file)
 #include <rpc/xdr.h>
 #include "vm_basic_types.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * glibc and Solaris headers seem to define functions for unsigned types with
  * slightly different names than all other platforms. Provide macros to
@@ -264,5 +268,9 @@ xdr_Bool(XDR *xdrs,  // IN
 }
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _VMXRPC_H_ */
 
index 5f6ece0d1888c6dec1edd9ebd028756dc6810f45..099ea59e711e4c785181e9ff1acff905bbcb44f5 100644 (file)
@@ -31,7 +31,6 @@
 #define VTHREAD_BASE_H
 
 #define INCLUDE_ALLOW_USERLEVEL
-
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
@@ -42,6 +41,9 @@
 #include <signal.h>
 #endif
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 /*
  * Types
@@ -154,5 +156,8 @@ void VThreadBase_SetIsInSignal(VThreadID tid, Bool isInSignal);
 
 #endif /* VMM */
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif // VTHREAD_BASE_H
index 55fb4ea26c67a9c41e0b465ce91a3ccd0439adbc..6b6531d9922095168225f299f886066c877a0c20 100644 (file)
 #include "vm_basic_types.h"
 #include "util.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * Helper macros for iterating over an rpcgen-generated array. Given a struct S:
  *
@@ -123,5 +127,9 @@ XdrUtil_ArrayAppend(void **array, u_int *arrayLen, size_t elemSz, u_int elemCnt)
 Bool
 XdrUtil_Deserialize(const void *data, size_t dataLen, void *xdrProc, void *dest);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _XDRUTIL_H_ */
 
index d97951dc2e7bafade397f4820a3a0e2e5cc91c72..f7e2b786a4320529fd00edbbb50bf076186daef4 100644 (file)
@@ -16,7 +16,6 @@
  *
  *********************************************************/
 
-
 #ifndef _VM_GUEST_LIB_INT_H_
 #define _VM_GUEST_LIB_INT_H_
 
@@ -26,6 +25,9 @@
 #include "vmware.h"
 #include "vmGuestLib.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 /*
  * Backdoor string for retrieving guestlib info
@@ -210,4 +212,8 @@ struct VMGuestLibDataV3 {
 #include "vmware_pack_end.h"
 VMGuestLibDataV3;
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _VM_GUEST_LIB_INT_H_ */