lua-users home
lua-l archive

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



On 03/01/2015 15:48, Roberto Ierusalimschy wrote:
>> Compiled with TDM-GCC 4.8.1-32bit under Windows-7 64bit (yes 32 bit
>> compiler in a 64bit machine) and got some warnings:
>>
>> [...]
>> liolib.c: In function 'io_pclose':
>> liolib.c:260:3: warning: implicit declaration of function '_pclose'
>> [-Wimplicit-function-declaration]
>>    return luaL_execresult(L, l_pclose(L, p->f));
>>    ^
>> liolib.c: In function 'io_popen':
>> liolib.c:268:3: warning: implicit declaration of function '_popen'
>> [-Wimplicit-function-declaration]
>>    p->f = l_popen(L, filename, mode);
>>    ^
>> [...]
>> Note that with this identical setup I compiled Lua 5.2.3 without warnings.
> 
> I believe you did not get the warnings but you did not get the features
> either, am I right? (That is, your compiled Lua 5.2 did not support
> io.popen.)
> 

Not at all. popen works correctly in that Lua 5.2.3 version: if I write
the following in the interactive interpreter:

>h = io.popen "dir"
>print(h:read"*a")

I correctly get the listing of the current directory. The same test also
works with the 5.3.0 version where I got the warnings.


> -- Roberto
> 
> 

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments