]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Header file change in preparation for C++11 compilation. Also updating
authorOliver Kurth <okurth@vmware.com>
Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 24 Apr 2018 00:08:15 +0000 (17:08 -0700)
copyright dates.

open-vm-tools/lib/include/vm_product_versions.h
open-vm-tools/lib/include/xdrutil.h

index 27820ff0a3eea7918dcd3942615164170280f065..f34efda9ae006ef819894e60258a88519afbbdf2 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2018 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
index a39e27d6a9e16805a83c29e6bb8fac36fa91f104..bb32ac1c9329b0dcee0132872fa56ab35628ecb1 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2018 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
@@ -65,17 +65,26 @@ extern "C" {
  * from a given XDR array.
  */
 #ifdef __GNUC__
-#   define XDRUTIL_ARRAYAPPEND(ptr, field, cnt)                 \
-       (typeof ((ptr)->field.field##_val))                      \
-       XdrUtil_ArrayAppend((void **) &(ptr)->field.field##_val, \
-                           &(ptr)->field.field##_len,           \
-                           sizeof *(ptr)->field.field##_val,    \
-                           (cnt))
+#   if defined(__cpp_decltype) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#      define XDRUTIL_ARRAYAPPEND(ptr, field, cnt)                      \
+          (decltype ((ptr)->field.field##_val))                         \
+          XdrUtil_ArrayAppend((void **) &(ptr)->field.field##_val,      \
+                              &(ptr)->field.field##_len,                \
+                              sizeof *(ptr)->field.field##_val,         \
+                              (cnt))
+#   else
+#      define XDRUTIL_ARRAYAPPEND(ptr, field, cnt)                      \
+          (typeof ((ptr)->field.field##_val))                           \
+          XdrUtil_ArrayAppend((void **) &(ptr)->field.field##_val,      \
+                              &(ptr)->field.field##_len,                \
+                              sizeof *(ptr)->field.field##_val,         \
+                              (cnt))
+#   endif
 #else
-#   define XDRUTIL_ARRAYAPPEND(ptr, field, cnt)                 \
-       XdrUtil_ArrayAppend((void **) &(ptr)->field.field##_val, \
-                           &(ptr)->field.field##_len,           \
-                           sizeof *(ptr)->field.field##_val,    \
+#   define XDRUTIL_ARRAYAPPEND(ptr, field, cnt)                         \
+       XdrUtil_ArrayAppend((void **) &(ptr)->field.field##_val,         \
+                           &(ptr)->field.field##_len,                   \
+                           sizeof *(ptr)->field.field##_val,            \
                            (cnt))
 #endif