summaryrefslogtreecommitdiffstats
path: root/include/ruby/win32.h
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-26 15:31:38 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-26 15:31:38 +0000
commita1a8abdf5dca801da1222ffbfc041abb609e81ce (patch)
tree08049faba4255c404d4497a9842a54f26121d62c /include/ruby/win32.h
parent8661b3b26914b50d58d6c2fe85b8c20054f73ae8 (diff)
merges r24179 from trunk into ruby_1_9_1.
-- * 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] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/win32.h')
-rw-r--r--include/ruby/win32.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 46388a3ae..c8da5044a 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -27,8 +27,14 @@ extern "C" {
// #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 */