diff options
author | spacewander <spacewanderlzx@gmail.com> | 2017-01-31 13:09:55 +0800 |
---|---|---|
committer | Yichun Zhang (agentzh) <agentzh@gmail.com> | 2017-01-31 12:17:37 -0800 |
commit | fd35fd98035735bc91c55d14832461e41dd0e193 (patch) | |
tree | 364d8e04b07fdb7390e76629afd2e7ccaff2cacd /fpconv.c | |
parent | a61d7840ba2d79df8cb73d8c864a99d0eb06d580 (diff) | |
download | lua-cjson-fd35fd98035735bc91c55d14832461e41dd0e193.tar.gz lua-cjson-fd35fd98035735bc91c55d14832461e41dd0e193.tar.bz2 lua-cjson-fd35fd98035735bc91c55d14832461e41dd0e193.zip |
feature: supports MS C compiler older than VC2012.
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
Diffstat (limited to 'fpconv.c')
-rw-r--r-- | fpconv.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -35,6 +35,12 @@ | |||
35 | 35 | ||
36 | #include "fpconv.h" | 36 | #include "fpconv.h" |
37 | 37 | ||
38 | /* Workaround for MSVC */ | ||
39 | #ifdef _MSC_VER | ||
40 | #define inline __inline | ||
41 | #define snprintf sprintf_s | ||
42 | #endif | ||
43 | |||
38 | /* Lua CJSON assumes the locale is the same for all threads within a | 44 | /* Lua CJSON assumes the locale is the same for all threads within a |
39 | * process and doesn't change after initialisation. | 45 | * process and doesn't change after initialisation. |
40 | * | 46 | * |