]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
C++ goodness continues
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)
open-vm-tools/lib/include/timeutil.h
open-vm-tools/lib/include/unicodeBase.h
open-vm-tools/lib/include/unicodeICU.h
open-vm-tools/lib/include/unicodeOperations.h
open-vm-tools/lib/include/unicodeTransforms.h
open-vm-tools/lib/include/unicodeTypes.h
open-vm-tools/lib/include/userlock.h
open-vm-tools/lib/include/util.h
open-vm-tools/lib/include/uuid.h
open-vm-tools/lib/include/windowsUtil.h
open-vm-tools/lib/include/wiper.h

index 05ef2f7e5d188f59f5034235061eecdb357b4089..0cccd5d8c1acaee5adac9d4b7f8af5c2b9037eda 100644 (file)
 #include "vm_basic_defs.h"
 #include "vm_assert.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 
 #define MAX_DAYSLEFT     4096
 
@@ -136,4 +140,8 @@ int TimeUtil_GetLocalWindowsTimeZoneIndexAndName(char **ptzName);
 
 time_t TimeUtil_SecondsSinceEpoch(TimeUtil_Date *d); // IN
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _TIMEUTIL_H_
index 101507e014f0884ab1044eba64bf137ad2900b6c..87f94d394e9408cbb3407909b307f1fa8d8ef467 100644 (file)
 #define INCLUDE_ALLOW_VMKERNEL
 #include "includeCheck.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <stdlib.h>
 #include <errno.h>
 #include "util.h"
 #include "unicodeTypes.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 #define UNICODE_SUBSTITUTION_CHAR "\xEF\xBF\xBD"
 
@@ -352,8 +351,8 @@ const char *Unicode_GetStatic(const char *asciiBytes,
    #define UNICODE_RELEASE_UTF16(s) free((utf16_t *)s)
 #endif
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // _UNICODE_BASE_H_
index 464af2a54c1a17be7a7765ab3539d22d7772521d..12e7eba8401bba770e28dbc0b0e76883e22fa78b 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "unicodeBase.h"
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -96,4 +96,8 @@ char *Unicode_Normalize(const char *str,
 }
 #endif
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // _UNICODE_ICU_H_
index e60e78883f66b473fd0d3b4e6ac2b052a9dfc3b6..2b0faabd4c847e03955100b33b6c2c657c8ebd19 100644 (file)
@@ -48,7 +48,7 @@
 #include "unicodeBase.h"
 #include "vm_assert.h"
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -766,9 +766,8 @@ Unicode_Truncate(const char *str,     // IN
    return Unicode_Substr(str, 0, length);
 }
 
-
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // _UNICODE_OPERATIONS_H_
index 6db21b102b3e6d497cdeca544a9df487f2dce1f6..4e762540f5dd51e73f0246b661704fcdc3a826c1 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "unicodeTypes.h"
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -53,8 +53,8 @@ char *Unicode_Trim(const char *str);
 char *Unicode_TrimLeft(const char *str);
 char *Unicode_TrimRight(const char *str);
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // _UNICODE_TRANSFORMS_H_
index 10b5aa95f7ce8e7e47a8e036f3fb7daa9af0e900..606e164a155405b4d80d89d9da0c0b020edfa971 100644 (file)
 #define INCLUDE_ALLOW_VMKERNEL
 #include "includeCheck.h"
 
+#include "vm_basic_types.h"
+#include "vm_assert.h"
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
-#include "vm_basic_types.h"
-#include "vm_assert.h"
-
 typedef ssize_t UnicodeIndex;
 
 /*
@@ -460,8 +459,8 @@ void Unicode_InitW(int argc, utf16_t **wargv, utf16_t **wenvp,
 StringEncoding Unicode_GetCurrentEncoding(void);
 StringEncoding Unicode_ResolveEncoding(StringEncoding encoding);
 
-#ifdef __cplusplus
-}
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif // _UNICODE_TYPES_H_
index 41c9128de1a4e0d6f64c6e15a6249bd58bd09ebf..039f94659d567ec4fd7babfc8d370cf819c1983c 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef _USERLOCK_H_
 #define _USERLOCK_H_
 
-
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 #include "mutexRank.h"
 #include "vthreadBase.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 typedef struct MXUserExclLock   MXUserExclLock;
 typedef struct MXUserRecLock    MXUserRecLock;
 typedef struct MXUserRWLock     MXUserRWLock;
@@ -268,4 +271,9 @@ MXUserRecLock       *MXUser_BindMXMutexRec(struct MX_MutexRec *mutex,
 
 struct MX_MutexRec  *MXUser_GetRecLockVmm(MXUserRecLock *lock);
 MX_Rank              MXUser_GetRecLockRank(MXUserRecLock *lock);
+
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif  // _USERLOCK_H_
index 01638b7826a0edb98acd7409c87f221f4e24d9c8..99d2d72b5e908482db460c0057bd63e99200ebaa 100644 (file)
@@ -50,6 +50,9 @@
 #include "vm_basic_defs.h"
 #include "unicodeTypes.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 /*
  * Define the Util_ThreadID type, and assorted standard bits.
@@ -675,5 +678,8 @@ Util_Memcpy32(void *dst,
 #endif
 }
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
 
 #endif /* UTIL_H */
index 53b4968aaedb90a14d6032ac0a2e2eed6315d91d..64f3aafe6e9a810469f4f6c0137c6371717330e5 100644 (file)
 #ifndef _UUID_H_
 #define _UUID_H_
 
-#ifdef __cplusplus
-extern "C"{
-#endif
-
 #define INCLUDE_ALLOW_USERLEVEL
 #define INCLUDE_ALLOW_VMCORE
 #include "includeCheck.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define UUID_SIZE 16
 #define UUID_STRSIZE (2*UUID_SIZE + 1)
 #define UUID_MAXLEN 48
@@ -160,8 +160,8 @@ UUIDStyle UUID_GetStyle(const uint8 *id);
 /* like UUID_GetHostUUID, except gets actual host UUID */
 char *UUID_GetRealHostUUID(void);
 
-#ifdef __cplusplus
-} // extern "C" {
+#if defined(__cplusplus)
+}  // extern "C"
 #endif
 
 #endif
index bb57bd83de9279b7a16295c015755d80118c2c93..5a1660aa97ba7f92cd6c723a983d7c9aafac4f80 100644 (file)
 #include "vm_atomic.h"
 #include "unicodeTypes.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #ifdef _WIN32
 
 /* Defines */
@@ -72,4 +76,9 @@ char *W32Util_GetInstalledFilePath64(const char *fileName);
 CRITICAL_SECTION *W32Util_GetSingletonCriticalSection(Atomic_Ptr *csMemory);
 
 #endif // _WIN32
+
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // WIN32UTIL_H_
index 7ef56e911b84e9faa431819d01788244b8b8fd9b..6eafb69cd0455c391234af146ccc1c3b34613cc7 100644 (file)
 #include "vm_basic_types.h"
 #include "dbllnklst.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 #define TOOLS_WIPE_CANCEL "Wipe cancelled by user.\n"
 
 typedef enum {
@@ -113,4 +117,8 @@ Wiper_State *Wiper_Start(const WiperPartition *p, unsigned int maxWiperFileSize)
 unsigned char *Wiper_Next(Wiper_State **s, unsigned int *progress);
 unsigned char *Wiper_Cancel(Wiper_State **s);
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif /* _WIPER_H_ */