summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-03 16:20:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-03 16:20:29 +0000
commit555d0728924f43d14f63288043036449804b3344 (patch)
tree3c4319f1b921cf70ed32d2f3e15059d719b0308d /win32
parentbf89a51315824d3563adbe478865ab47a8f33113 (diff)
* win32.h: only VC6 needs extern "C++" for math.h. [ruby-talk:285660]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/win32/win32.h b/win32/win32.h
index 87f4d4867a..d9311076ec 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -51,17 +51,19 @@
#undef finally
#undef leave
-#if defined(__cplusplus)
-extern "C++" {
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <direct.h>
#include <process.h>
#include <time.h>
+#if defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER == 1200
+extern "C++" { /* template without extern "C++" */
+#endif
#include <math.h>
+#if defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER == 1200
+}
+#endif
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -73,10 +75,6 @@ extern "C++" {
#include <io.h>
#include <malloc.h>
-#if defined(__cplusplus)
-}
-#endif
-
#ifdef _M_IX86
# define WIN95 1
#else