diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-11-15 11:43:32 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-11-15 11:43:32 -0300 |
commit | ee6a4cd1eca4fa736d108e1e0ac3cb9858f7a5ef (patch) | |
tree | cad617cdde64cdfc79907e23537d823fb1a56e12 | |
parent | 8a4419b119ea9d03bb20b208587b0bbd6f473cdc (diff) | |
download | lua-ee6a4cd1eca4fa736d108e1e0ac3cb9858f7a5ef.tar.gz lua-ee6a4cd1eca4fa736d108e1e0ac3cb9858f7a5ef.tar.bz2 lua-ee6a4cd1eca4fa736d108e1e0ac3cb9858f7a5ef.zip |
Ease slightly making Lua with C89
-rw-r--r-- | luaconf.h | 5 | ||||
-rw-r--r-- | makefile | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -87,6 +87,11 @@ | |||
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | 89 | ||
90 | #if defined(LUA_USE_C89) && defined(LUA_USE_POSIX) | ||
91 | #error "Posix is not compatible with C89" | ||
92 | #endif | ||
93 | |||
94 | |||
90 | /* | 95 | /* |
91 | @@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits. | 96 | @@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits. |
92 | */ | 97 | */ |
@@ -69,7 +69,9 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC) | |||
69 | LOCAL = $(TESTS) $(CWARNS) | 69 | LOCAL = $(TESTS) $(CWARNS) |
70 | 70 | ||
71 | 71 | ||
72 | # enable Linux goodies | 72 | # To enable Linux goodies, -DLUA_USE_LINUX |
73 | # For C89, "-std=c89 -DLUA_USE_C89" | ||
74 | # Note that Linux/Posix options are not compatible with C89 | ||
73 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX | 75 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX |
74 | MYLDFLAGS= $(LOCAL) -Wl,-E | 76 | MYLDFLAGS= $(LOCAL) -Wl,-E |
75 | MYLIBS= -ldl | 77 | MYLIBS= -ldl |