From b0cbe778168e31625c8c59ad198dff3d8e093ccc Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 25 Nov 2011 10:50:03 -0200
Subject: '_fseeki64' and family not available in all Windows platforms

---
 liolib.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'liolib.c')

diff --git a/liolib.c b/liolib.c
index 4beee64a..2b4deb12 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
 /*
-** $Id: liolib.c,v 2.106 2011/11/11 19:59:17 roberto Exp roberto $
+** $Id: liolib.c,v 2.107 2011/11/14 16:55:35 roberto Exp roberto $
 ** Standard I/O (and system) library
 ** See Copyright Notice in lua.h
 */
@@ -78,7 +78,9 @@
 #define l_ftell(f)		ftello(f)
 #define l_seeknum		off_t
 
-#elif defined(LUA_WIN)
+#elif defined(LUA_WIN) && !defined(_CRTIMP_TYPEINFO) \
+   && defined(_MSC_VER) && (_MSC_VER >= 1400)
+/* Windows (but not DDK) and Visual C++ 2005 or higher */
 
 #define l_fseek(f,o,w)		_fseeki64(f,o,w)
 #define l_ftell(f)		_ftelli64(f)
-- 
cgit v1.2.3-55-g6feb