changeset 10281:9fd1e876ec1f

8150079: MSVC prior to VS 2013 doesn't know the 'va_copy' macro Reviewed-by: dholmes
author simonis
date Wed, 17 Feb 2016 22:17:49 -0500
parents 5c492a3bcacf
children 50e7ba84b313
files src/share/vm/prims/jni.cpp src/share/vm/utilities/globalDefinitions_visCPP.hpp
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp	Wed Feb 17 23:57:17 2016 +0100
+++ b/src/share/vm/prims/jni.cpp	Wed Feb 17 22:17:49 2016 -0500
@@ -930,13 +930,7 @@
                              _arguments->push_oop(Handle((oop *)l, false)); }
 
   inline void set_ap(va_list rap) {
-#ifdef va_copy
     va_copy(_ap, rap);
-#elif defined (__va_copy)
-    __va_copy(_ap, rap);
-#else
-    _ap = rap;
-#endif
   }
 
  public:
--- a/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Wed Feb 17 23:57:17 2016 +0100
+++ b/src/share/vm/utilities/globalDefinitions_visCPP.hpp	Wed Feb 17 22:17:49 2016 -0500
@@ -174,6 +174,8 @@
 #if _MSC_VER < 1800
 // Visual Studio 2013 introduced strtoull(); before, one has to use _strtoui64() instead.
 #define strtoull _strtoui64
+// Visual Studio prior to 2013 had no va_copy, but could safely copy va_list by assignement
+#define va_copy(dest, src) dest = src
 // Fixes some wrong warnings about 'this' : used in base member initializer list
 #pragma warning( disable : 4355 )
 #endif