1 /* $NetBSD: lprefix.h,v 1.8 2023/04/16 20:46:17 nikita Exp $ */ 2 3 /* 4 ** Id: lprefix.h 5 ** Definitions for Lua code that must come before any other header file 6 ** See Copyright Notice in lua.h 7 */ 8 9 #ifndef lprefix_h 10 #define lprefix_h 11 12 13 #ifndef _KERNEL 14 /* 15 ** Allows POSIX/XSI stuff 16 */ 17 #if !defined(LUA_USE_C89) /* { */ 18 19 #if !defined(_XOPEN_SOURCE) 20 #define _XOPEN_SOURCE 600 21 #elif _XOPEN_SOURCE == 0 22 #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 23 #endif 24 25 /* 26 ** Allows manipulation of large files in gcc and some other compilers 27 */ 28 #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 29 #define _LARGEFILE_SOURCE 1 30 #define _FILE_OFFSET_BITS 64 31 #endif 32 33 #endif /* } */ 34 #endif /* _KERNEL */ 35 36 37 /* 38 ** Windows stuff 39 */ 40 #if defined(_WIN32) /* { */ 41 42 #if !defined(_CRT_SECURE_NO_WARNINGS) 43 #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 44 #endif 45 46 #endif /* } */ 47 48 #endif 49 50