lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I doubt that pclose() is in the ANSI C standard.

Does not grep here
nor in C89

So unless I'm mistaken if Lua is strict ANSI only it should not be
there. (Or accept Posix 2001 where pclose is from)

On Wed, Jan 19, 2011 at 2:32 PM, David Favro <> wrote:
> On 01/19/2011 06:22 AM, Luiz Henrique de Figueiredo wrote:
>>> This is really two changes, one which fixes the just-plain-wrong behavior of
>>> the return-value of file:close() when called on a pipe on Linux (and
>>> presumably also other posix platforms)
>> Thanks for your patch but Lua targets ANSI C platforms not POSIX.
>> We prefer to avoid #ifdefs in the main code.
> By "in the main code" I guess you mean "in .c files, rather than in .h
> files"?  Because the file that I patched, liolib.c, is full of #if's, for
> example on LUA_USE_POPEN, which is defined in luaconf.h, based on
> LUA_USE_POSIX, which is defined in luaconf.h based on LUA_USE_LINUX, which
> is what I #if'd on.  But one could certainly define another macro,
> LUA_USE_WAIT, in luaconf.h based on LUA_USE_LINUX, and then #if in the .c
> file based on that rather than LUA_USE_LINUX as I did.