blob: 6cb5dfcccbf6f4f05016c6849d5cc7757ebfa07e [file] [log] [blame]
Brad Bishop2d39a062019-10-28 08:33:36 -04001From 6fb28085e867d7c3ef46577d9ff193a185693bcb Mon Sep 17 00:00:00 2001
2From: Oliver Kurth <okurth@vmware.com>
3Date: Mon, 30 Sep 2019 16:24:27 -0700
4Subject: [PATCH] GitHub Issue #367. Remove references to deprecated G_INLINE_FUNC.
5
6G_INLINE_FUNC was a work-around for compilers that didn't support
7static inline. Change uses of it to static inline.
8
9Upstream-Status: Backport
10[https://github.com/vmware/open-vm-tools/commit/89c0d444567eb525e8d083fb564c46d68e96660c]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 open-vm-tools/lib/include/vmware/tools/plugin.h | 2 +-
15 open-vm-tools/lib/include/vmware/tools/threadPool.h | 8 ++++----
16 open-vm-tools/lib/include/vmware/tools/utils.h | 9 ---------
17 3 files changed, 5 insertions(+), 14 deletions(-)
18
19diff --git a/open-vm-tools/lib/include/vmware/tools/plugin.h b/open-vm-tools/lib/include/vmware/tools/plugin.h
20index f9acc6a2..deefd1f3 100644
21--- a/open-vm-tools/lib/include/vmware/tools/plugin.h
22+++ b/open-vm-tools/lib/include/vmware/tools/plugin.h
23@@ -290,7 +290,7 @@ typedef struct ToolsAppCtx {
24 *
25 * @return TRUE if COM is initialized when the function returns.
26 */
27-G_INLINE_FUNC gboolean
28+static inline gboolean
29 ToolsCore_InitializeCOM(ToolsAppCtx *ctx)
30 {
31 if (!ctx->comInitialized) {
32diff --git a/open-vm-tools/lib/include/vmware/tools/threadPool.h b/open-vm-tools/lib/include/vmware/tools/threadPool.h
33index 3f2082b3..5880fbcf 100644
34--- a/open-vm-tools/lib/include/vmware/tools/threadPool.h
35+++ b/open-vm-tools/lib/include/vmware/tools/threadPool.h
36@@ -91,7 +91,7 @@ typedef struct ToolsCorePool {
37 *******************************************************************************
38 */
39
40-G_INLINE_FUNC ToolsCorePool *
41+static inline ToolsCorePool *
42 ToolsCorePool_GetPool(ToolsAppCtx *ctx)
43 {
44 ToolsCorePool *pool = NULL;
45@@ -123,7 +123,7 @@ ToolsCorePool_GetPool(ToolsAppCtx *ctx)
46 *******************************************************************************
47 */
48
49-G_INLINE_FUNC guint
50+static inline guint
51 ToolsCorePool_SubmitTask(ToolsAppCtx *ctx,
52 ToolsCorePoolCb cb,
53 gpointer data,
54@@ -153,7 +153,7 @@ ToolsCorePool_SubmitTask(ToolsAppCtx *ctx,
55 *******************************************************************************
56 */
57
58-G_INLINE_FUNC void
59+static inline void
60 ToolsCorePool_CancelTask(ToolsAppCtx *ctx,
61 guint taskId)
62 {
63@@ -197,7 +197,7 @@ ToolsCorePool_CancelTask(ToolsAppCtx *ctx,
64 *******************************************************************************
65 */
66
67-G_INLINE_FUNC gboolean
68+static inline gboolean
69 ToolsCorePool_StartThread(ToolsAppCtx *ctx,
70 const gchar *threadName,
71 ToolsCorePoolCb cb,
72diff --git a/open-vm-tools/lib/include/vmware/tools/utils.h b/open-vm-tools/lib/include/vmware/tools/utils.h
73index f6574590..a3292d5c 100644
74--- a/open-vm-tools/lib/include/vmware/tools/utils.h
75+++ b/open-vm-tools/lib/include/vmware/tools/utils.h
76@@ -51,15 +51,6 @@
77 # include <sys/time.h>
78 #endif
79
80-
81-/* Work around a glib limitation: it doesn't set G_INLINE_FUNC on Win32. */
82-#if defined(G_PLATFORM_WIN32)
83-# if defined(G_INLINE_FUNC)
84-# undef G_INLINE_FUNC
85-# endif
86-# define G_INLINE_FUNC static __inline
87-#endif
88-
89 #ifndef ABS
90 # define ABS(x) (((x) >= 0) ? (x) : -(x))
91 #endif
92--
932.23.0
94