]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Update Glib header inclusion to address C++ compatibility issues.
authorKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:26 +0000 (10:35 -0700)
committerKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:26 +0000 (10:35 -0700)
open-vm-tools/lib/include/vmware/tools/gdp.h
open-vm-tools/lib/include/vmware/tools/guestStore.h
open-vm-tools/lib/include/vmware/tools/guestrpc.h
open-vm-tools/lib/include/vmware/tools/plugin.h
open-vm-tools/lib/include/vmware/tools/threadPool.h
open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteDest.cc
open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteSrc.cc

index edf135fb2f1d8133c4a4a968ea07b04dca64ff03..c071cd5320c1216ecb1ee1996f38ea59c29ffd51 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (c) 2020-2021 VMware, Inc. All rights reserved.
+ * Copyright (c) 2020-2021,2023 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
  * Public interface of the "gdp" plugin service.
  */
 
+/*
+ * glib-object.h should not be placed inside `extern "C"' blocks.
+ * However, this header is often placed inside such blocks.
+ * Here we change back into C++ for glib-object.h
+ */
+#ifdef __cplusplus
+extern "C++" {
+#endif
 #include <glib-object.h>
+#ifdef __cplusplus
+}
+#endif
+
 #include "vmware/tools/plugin.h"
 
 /*
index 0552e43d85d6992d8cbcfcc1eaa307e44369255e..f099f83a6138a0282e98fb7d2eaddcf3e66a8832 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (c) 2020 VMware, Inc. All rights reserved.
+ * Copyright (c) 2020,2023 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
  * @{
  */
 
+/*
+ * glib-object.h should not be placed inside `extern "C"' blocks.
+ * However, this header is often placed inside such blocks.
+ * Here we change back into C++ for glib-object.h
+ */
+#ifdef __cplusplus
+extern "C++" {
+#endif
 #include <glib-object.h>
+#ifdef __cplusplus
+}
+#endif
+
 #include "vmware/tools/plugin.h"
 
 /**
index 667023b7f48022df2d10eb4292dfb1ee0c97c16c..e8779b5faefcd9f1afbdca2c73fb39d91f270288 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008,2014-2016,2018-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008,2014-2016,2018-2020,2023 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
  * @{
  */
 
+/*
+ * glib.h should not be placed inside `extern "C"' blocks.
+ * However, this header is often placed inside such blocks.
+ * Here we change back into C++ for glib.h
+ */
+#ifdef __cplusplus
+extern "C++" {
+#endif
 #include <glib.h>
+#ifdef __cplusplus
+}
+#endif
+
 #include "vmware/tools/utils.h"
 
 G_BEGIN_DECLS
index f8013f8c07f23c67699931995e8f41ee6b6a5a4a..91c74e1814fc4c517b345bfaef081b2c44bf6781 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (c) 2008-2020 VMware, Inc. All rights reserved.
+ * Copyright (c) 2008-2020,2023 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
  * @{
  */
 
+/*
+ * glib.h should not be placed inside `extern "C"' blocks.
+ * However, this header is often placed inside such blocks.
+ * Here we change back into C++ for glib.h
+ */
+#ifdef __cplusplus
+extern "C++" {
+#endif
 #include <glib.h>
+#ifdef __cplusplus
+}
+#endif
+
 #if defined(G_PLATFORM_WIN32)
 #  include <windows.h>
 #  include <objbase.h>
index 5880fbcff76daa6ab63d6a72c7af36b92cbe367e..792be29a5a790f3686b55f584bd778086a9ac78e 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2010-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2019,2023 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
  * thread.
  */
 
+/*
+ * glib-object.h should not be placed inside `extern "C"' blocks.
+ * However, this header is often placed inside such blocks.
+ * Here we change back into C++ for glib-object.h
+ */
+#ifdef __cplusplus
+extern "C++" {
+#endif
 #include <glib-object.h>
+#ifdef __cplusplus
+}
+#endif
+
 #include "vmware/tools/plugin.h"
 
 #define TOOLS_CORE_PROP_TPOOL "tcs_prop_thread_pool"
index 918fdb37a6dfa269d9901638246ad1f4b5ed5272..f91855624641a73427cf19b67e2a751266ecdfca 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2016,2023 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 "guestCopyPaste.hh"
+#include <glib.h>
 
 extern "C" {
-   #include <glib.h>
-
    #include "dndClipboard.h"
    #include "debug.h"
 }
index f08917e28e7e12ec3cc259e2f88ff80d34ec3386..42b14a74c9f4fc9ae13aac819776423a4d837694 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2010-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2017,2023 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 "guestCopyPaste.hh"
+#include <glib.h>
 
 extern "C" {
-   #include <glib.h>
-
    #include "dndClipboard.h"
    #include "debug.h"
    #include "cpNameUtil.h"