From a716ae1f50764aa8f785b0fd85a7f533e53756e0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 9 Nov 2011 12:47:14 -0200 Subject: [PATCH] avoids including 'stdio.h' everywhere (because of definitions for luai_writestring/luai_writeline) --- luaconf.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/luaconf.h b/luaconf.h index 86d3758e..c881919b 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.164 2011/10/07 19:53:05 roberto Exp roberto $ +** $Id: luaconf.h,v 1.165 2011/11/05 15:29:05 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -210,10 +210,14 @@ /* @@ luai_writestring/luai_writeline define how 'print' prints its results. +** They are only used in libraries and the stand-alone program. (The #if +** avoids including 'stdio.h' everywhere.) */ +#if defined(LUA_LIB) || defined(lua_c) || defined(luaall_c) #include #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) +#endif /* @@ luai_writestringerror defines how to print error messages.