summaryrefslogtreecommitdiff
path: root/lprefix.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-29 14:54:13 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-29 14:54:13 -0200
commitc077d4746503b929ac4113c7875175c54eb5796a (patch)
tree402bb27b5f18ff7a5d6593fd7fb43e1ebd005515 /lprefix.h
parent8e5290d81eb0ff32a4d1d41685f682ab62498da5 (diff)
downloadlua-github-c077d4746503b929ac4113c7875175c54eb5796a.tar.gz
does not define _XOPEN_SOURCE when LUA_USE_C89 is defined + defining
_XOPEN_SOURCE==0 undefines that macro
Diffstat (limited to 'lprefix.h')
-rw-r--r--lprefix.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lprefix.h b/lprefix.h
index 3f6fbd98..6b72f0eb 100644
--- a/lprefix.h
+++ b/lprefix.h
@@ -1,5 +1,5 @@
/*
-** $Id: $
+** $Id: lprefix.h,v 1.1 2014/11/03 15:12:44 roberto Exp roberto $
** Definitions for Lua code that must come before any other header file
** See Copyright Notice in lua.h
*/
@@ -11,18 +11,24 @@
/*
** Allows POSIX/XSI stuff
*/
+#if !defined(LUA_USE_C89) /* { */
+
#if !defined(_XOPEN_SOURCE)
#define _XOPEN_SOURCE 600
+#elif _XOPEN_SOURCE == 0
+#undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */
#endif
/*
** Allows manipulation of large files in gcc and some other compilers
*/
-#if !defined(_FILE_OFFSET_BITS)
+#if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS)
#define _LARGEFILE_SOURCE 1
#define _FILE_OFFSET_BITS 64
#endif
+#endif /* } */
+
/*
** Windows stuff