2014-11-03 18:12:44 +03:00
|
|
|
/*
|
2018-08-23 20:26:12 +03:00
|
|
|
** $Id: lprefix.h $
|
2014-11-03 18:12:44 +03:00
|
|
|
** Definitions for Lua code that must come before any other header file
|
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef lprefix_h
|
|
|
|
#define lprefix_h
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Allows POSIX/XSI stuff
|
|
|
|
*/
|
2014-12-29 19:54:13 +03:00
|
|
|
#if !defined(LUA_USE_C89) /* { */
|
|
|
|
|
2014-11-03 18:12:44 +03:00
|
|
|
#if !defined(_XOPEN_SOURCE)
|
|
|
|
#define _XOPEN_SOURCE 600
|
2014-12-29 19:54:13 +03:00
|
|
|
#elif _XOPEN_SOURCE == 0
|
|
|
|
#undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */
|
2014-11-03 18:12:44 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Allows manipulation of large files in gcc and some other compilers
|
|
|
|
*/
|
2014-12-29 19:54:13 +03:00
|
|
|
#if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS)
|
2014-11-03 18:12:44 +03:00
|
|
|
#define _LARGEFILE_SOURCE 1
|
|
|
|
#define _FILE_OFFSET_BITS 64
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 19:54:13 +03:00
|
|
|
#endif /* } */
|
|
|
|
|
2014-11-03 18:12:44 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
** Windows stuff
|
|
|
|
*/
|
2020-04-23 20:48:15 +03:00
|
|
|
#if defined(_WIN32) /* { */
|
2014-11-03 18:12:44 +03:00
|
|
|
|
|
|
|
#if !defined(_CRT_SECURE_NO_WARNINGS)
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* } */
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|