Status: New
Owner: ----
New issue 1695 by alxvasi...@gmail.com: compiler error: missing fopen_s in
d8.cc, when building with Mingw
http://code.google.com/p/v8/issues/detail?id=1695
WHen building D8 on windows with mingw, a compiler error occurs when
building d8.cc - the compiler complains about fopen_s() not being defined.
Tee reason is that fopen_s is MSVC specific and is not present in MINGW.
THe following patch adds a check for mingw along with the WIN32 check, and
for MINGW uses the standard fopen():
Index: src/d8.cc
===================================================================
--- src/d8.cc (revision 9285)
+++ src/d8.cc (working copy)
@@ -804,7 +804,7 @@
static FILE* FOpen(const char* path, const char* mode) {
-#if (defined(_WIN32) || defined(_WIN64))
+#if (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)))
FILE* result;
if (fopen_s(&result, path, mode) == 0) {
return result;
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev