diff --git a/luaconf.h b/luaconf.h index afc1b8b5..bd394650 100644 --- a/luaconf.h +++ b/luaconf.h @@ -87,6 +87,11 @@ #endif +#if defined(LUA_USE_C89) && defined(LUA_USE_POSIX) +#error "Posix is not compatible with C89" +#endif + + /* @@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits. */ diff --git a/makefile b/makefile index b37fdb28..58de5ddb 100644 --- a/makefile +++ b/makefile @@ -69,7 +69,9 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC) LOCAL = $(TESTS) $(CWARNS) -# enable Linux goodies +# To enable Linux goodies, -DLUA_USE_LINUX +# For C89, "-std=c89 -DLUA_USE_C89" +# Note that Linux/Posix options are not compatible with C89 MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX MYLDFLAGS= $(LOCAL) -Wl,-E MYLIBS= -ldl