summaryrefslogtreecommitdiff
path: root/src/lprefix.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lprefix.h')
-rw-r--r--src/lprefix.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lprefix.h b/src/lprefix.h
new file mode 100644
index 00000000..c2a78cd7
--- /dev/null
+++ b/src/lprefix.h
@@ -0,0 +1,39 @@
+/*
+** $Id: lprefix.h,v 1.1 2014/11/03 15:12:44 roberto Exp $
+** 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
+