lprefix.h 867 B

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