[前][次][番号順一覧][スレッド一覧]

ruby-changes:12479

From: usa <ko1@a...>
Date: Sat, 18 Jul 2009 06:33:31 +0900 (JST)
Subject: [ruby-changes:12479] Ruby:r24179 (trunk): * include/ruby/win32.h: include winsock headers in extern "C++" for

usa	2009-07-18 06:33:05 +0900 (Sat, 18 Jul 2009)

  New Revision: 24179

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24179

  Log:
    * include/ruby/win32.h: include winsock headers in extern "C++" for
      C++ extension libraries.
    * include/ruby/missing.h (vsnprintf): workaround for VC++.
      [ruby-core:23096]

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/missing.h
    trunk/include/ruby/win32.h

Index: include/ruby/missing.h
===================================================================
--- include/ruby/missing.h	(revision 24178)
+++ include/ruby/missing.h	(revision 24179)
@@ -151,13 +151,7 @@
 RUBY_EXTERN int snprintf(char *, size_t n, char const *, ...);
 #endif
 #ifndef HAVE_VSNPRINTF
-# if _MSC_VER >= 1300
-#  pragma warning(disable: 4273)
-# endif
-RUBY_EXTERN int vsnprintf(char *, size_t n, char const *, va_list);
-# if _MSC_VER >= 1300
-#  pragma warning(default: 4273)
-# endif
+extern int vsnprintf(char *, size_t n, char const *, va_list);
 #endif
 
 #ifndef HAVE_STRLCPY
Index: include/ruby/win32.h
===================================================================
--- include/ruby/win32.h	(revision 24178)
+++ include/ruby/win32.h	(revision 24179)
@@ -27,9 +27,15 @@
 
 // #include <stdarg.h> conflict with varargs.h?
 #if !defined(WSAAPI)
+#if defined(__cplusplus) && defined(_MSC_VER)
+extern "C++" {			/* template without extern "C++" */
+#endif
 #include <winsock2.h>
 #include <ws2tcpip.h>
+#if defined(__cplusplus) && defined(_MSC_VER)
+}
 #endif
+#endif
 
 #define NT 1			/* deprecated */
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24178)
+++ ChangeLog	(revision 24179)
@@ -1,3 +1,11 @@
+Sat Jul 18 06:30:35 2009  NAKAMURA Usaku  <usa@r...>
+
+	* include/ruby/win32.h: include winsock headers in extern "C++" for
+	  C++ extension libraries.
+
+	* include/ruby/missing.h (vsnprintf): workaround for VC++.
+	  [ruby-core:23096]
+
 Sat Jul 18 00:23:47 2009  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* ext/readline/readline.c (Init_readline): rl_catch_signals does

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]