lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> If I define _MSC_VER, it is utilized the 64-bit functions, MinGW can use
> them, but not by default.

Isn't this a solution?
 
use of this define globally (such as make MYCFLAGS="-D_MSC_VER=1400" mingw) leads to a large number of errors at link time. and just have to do a patch, it is best to do so:

liolib.c:
 #if !defined(l_fseek) /* { */
  
- #if defined(LUA_USE_POSIX) /* { */
+ #if defined(LUA_USE_POSIX) || defined(__MINGW32__) /* { */
  
  #include <sys/types.h>
  
  #define l_fseek(f,o,w) fseeko(f,o,w)
  #define l_ftell(f) ftello(f)
  #define l_seeknum off_t

tested in MinGW 4.9.2 in Ubuntu and Windows (both x86_64 and i686 version).