From 4b839d7c72f2b3ae6f0a2c91316be0ab84d0f708 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 3 Nov 2014 13:12:44 -0200 Subject: [PATCH] Definitions for Lua code that must come before any other header file --- lprefix.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lprefix.h diff --git a/lprefix.h b/lprefix.h new file mode 100644 index 00000000..3f6fbd98 --- /dev/null +++ b/lprefix.h @@ -0,0 +1,39 @@ +/* +** $Id: $ +** 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 +*/ +#if !defined(_XOPEN_SOURCE) +#define _XOPEN_SOURCE 600 +#endif + +/* +** Allows manipulation of large files in gcc and some other compilers +*/ +#if !defined(_FILE_OFFSET_BITS) +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#endif + + +/* +** Windows stuff +*/ +#if defined(_WIN32) /* { */ + +#if !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ +#endif + +#endif /* } */ + +#endif +