diff options
-rw-r--r-- | lprefix.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: $ | 2 | ** $Id: lprefix.h,v 1.1 2014/11/03 15:12:44 roberto Exp roberto $ |
3 | ** Definitions for Lua code that must come before any other header file | 3 | ** Definitions for Lua code that must come before any other header file |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -11,18 +11,24 @@ | |||
11 | /* | 11 | /* |
12 | ** Allows POSIX/XSI stuff | 12 | ** Allows POSIX/XSI stuff |
13 | */ | 13 | */ |
14 | #if !defined(LUA_USE_C89) /* { */ | ||
15 | |||
14 | #if !defined(_XOPEN_SOURCE) | 16 | #if !defined(_XOPEN_SOURCE) |
15 | #define _XOPEN_SOURCE 600 | 17 | #define _XOPEN_SOURCE 600 |
18 | #elif _XOPEN_SOURCE == 0 | ||
19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ | ||
16 | #endif | 20 | #endif |
17 | 21 | ||
18 | /* | 22 | /* |
19 | ** Allows manipulation of large files in gcc and some other compilers | 23 | ** Allows manipulation of large files in gcc and some other compilers |
20 | */ | 24 | */ |
21 | #if !defined(_FILE_OFFSET_BITS) | 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) |
22 | #define _LARGEFILE_SOURCE 1 | 26 | #define _LARGEFILE_SOURCE 1 |
23 | #define _FILE_OFFSET_BITS 64 | 27 | #define _FILE_OFFSET_BITS 64 |
24 | #endif | 28 | #endif |
25 | 29 | ||
30 | #endif /* } */ | ||
31 | |||
26 | 32 | ||
27 | /* | 33 | /* |
28 | ** Windows stuff | 34 | ** Windows stuff |