Customized fork of github.com/rxi/lite

Enable LUA_USE_POSIX, fix tmpnam warning on macOS.

On macOS, we want to use `mkstemp` rather than `tmpnam`. Enable
POSIX support in Lua to fix that (and some other things). Since
POSIX support also enables the flag for POPEN, we no longer need
to do that directly for Linux.

Changed files
+3 -2
+3 -2
build.sh
··· 1 1 #!/bin/bash 2 2 3 - cflags="-Wall -O3 -g -std=gnu11 -Isrc -DLUA_USE_POPEN" 3 + cflags="-Wall -O3 -g -std=gnu11 -Isrc" 4 4 lflags="-lSDL2 -lm" 5 5 6 6 if [[ $* == *windows* ]]; then 7 7 platform="windows" 8 8 outfile="lite.exe" 9 9 compiler="x86_64-w64-mingw32-gcc" 10 - cflags="$cflags -Iwinlib/SDL2-2.0.10/x86_64-w64-mingw32/include" 10 + cflags="$cflags -DLUA_USE_POPEN -Iwinlib/SDL2-2.0.10/x86_64-w64-mingw32/include" 11 11 lflags="$lflags -Lwinlib/SDL2-2.0.10/x86_64-w64-mingw32/lib" 12 12 lflags="-lmingw32 -lSDL2main $lflags -mwindows -o $outfile res.res" 13 13 x86_64-w64-mingw32-windres res.rc -O coff -o res.res ··· 15 15 platform="unix" 16 16 outfile="lite" 17 17 compiler="gcc" 18 + cflags="$cflags -DLUA_USE_POSIX" 18 19 lflags="$lflags -o $outfile" 19 20 fi 20 21