Define a replacement for va_copy for MSVC.
authorEli Zaretskii <eliz@gnu.org>
Mon, 9 May 2011 13:35:56 +0000 (16:35 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 9 May 2011 13:35:56 +0000 (16:35 +0300)
 nt/config.nt [_MSC_VER] (va_copy): Replacement for the MS compiler.

nt/ChangeLog
nt/config.nt

index 5d69142..6de2b15 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * config.nt [_MSC_VER] (va_copy): Replacement for the MS compiler.
+
 2011-05-07  Ben Key  <bkey76@gmail.com>
 
        * configure.bat: Renamed the fusercflags variable to escusercflags
index 55a8bcc..c071baf 100644 (file)
@@ -337,6 +337,17 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 # define restrict
 #endif
 
+/* A va_copy replacement for MSVC.  */
+#ifdef _MSC_VER
+# ifdef _WIN64
+#  ifndef va_copy
+#   error "va_copy is needed, but not defined!"
+#  endif
+# else /* not _WIN64 */
+#  define va_copy(d,s) ((d) = (s))
+# endif         /* not _WIN64 */
+#endif  /* _MSC_VER */
+
 /* Define as a marker that can be attached to declarations that might not
     be used.  This helps to reduce warnings, such as from
     GCC -Wunused-parameter.  */