diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2015-01-14 03:52:56 +0100 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2015-01-14 03:52:56 +0100 |
commit | cdd787b876efe2e662ba7d6e8b9e38bf9f44bc04 (patch) | |
tree | be89d436fec1054bf1b5cdcb14ffd13579f99d34 /lprefix.h | |
parent | 8ec87cc5b2afb05fd94fe11f35e997f26804cfef (diff) | |
download | lua-compat-5.3-cdd787b876efe2e662ba7d6e8b9e38bf9f44bc04.tar.gz lua-compat-5.3-cdd787b876efe2e662ba7d6e8b9e38bf9f44bc04.tar.bz2 lua-compat-5.3-cdd787b876efe2e662ba7d6e8b9e38bf9f44bc04.zip |
add utf8 library from Lua 5.3; use struct for string packing
Diffstat (limited to 'lprefix.h')
-rw-r--r-- | lprefix.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lprefix.h b/lprefix.h new file mode 100644 index 0000000..788da4e --- /dev/null +++ b/lprefix.h | |||
@@ -0,0 +1,56 @@ | |||
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 | |||
7 | #ifndef lprefix_h | ||
8 | #define lprefix_h | ||
9 | |||
10 | |||
11 | /* | ||
12 | ** Allows POSIX/XSI stuff | ||
13 | */ | ||
14 | #if !defined(LUA_USE_C89) /* { */ | ||
15 | |||
16 | #if !defined(_XOPEN_SOURCE) | ||
17 | #define _XOPEN_SOURCE 600 | ||
18 | #elif _XOPEN_SOURCE == 0 | ||
19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ | ||
20 | #endif | ||
21 | |||
22 | /* | ||
23 | ** Allows manipulation of large files in gcc and some other compilers | ||
24 | */ | ||
25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) | ||
26 | #define _LARGEFILE_SOURCE 1 | ||
27 | #define _FILE_OFFSET_BITS 64 | ||
28 | #endif | ||
29 | |||
30 | #endif /* } */ | ||
31 | |||
32 | |||
33 | /* | ||
34 | ** Windows stuff | ||
35 | */ | ||
36 | #if defined(_WIN32) /* { */ | ||
37 | |||
38 | #if !defined(_CRT_SECURE_NO_WARNINGS) | ||
39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ | ||
40 | #endif | ||
41 | |||
42 | #endif /* } */ | ||
43 | |||
44 | |||
45 | /* COMPAT53 adaptation */ | ||
46 | #include "c-api/compat-5.3.h" | ||
47 | |||
48 | #undef LUAMOD_API | ||
49 | #define LUAMOD_API extern | ||
50 | |||
51 | #ifndef luaopen_utf8 | ||
52 | # define luaopen_utf8 luaopen_compat53_utf8 | ||
53 | #endif | ||
54 | |||
55 | #endif | ||
56 | |||