lua-users home
lua-l archive

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


Hi!

Am 17.08.2010 12:07, schrieb Gunnar Zötl:
>> On Tue, Aug 17, 2010 at 3:12 AM, Gunnar Zötl wrote:
> 
>> Looks nice!
> 
> Thanks :)
> 
>> I am getting some warnings about implicit functions on Linux,
>> this seems to shut them up:
>>
>>   #define __USE_XOPEN
>>   #define __USE_XOPEN2KXSI
>>
>> But there might be a compiler switch or a higher-level define
>> that would be a better fix.
> 
> Yes, __USE_XOPEN does fix it, but that is a low level #define. According to the man page, _XOPEN_SOURCE should do the trick - which it doesn't. Neither does _XOPEN_SOURCE_EXTENDED...

_XOPEN_SOURCE *does* the trick, but you need to put it before the lua
includes (because they include stdlib.h somewhere) and you need to use
#define _XOPEN_SOURCE 600
for posix_openpt to be declared.

> 
>> The only other warnings I get are:
>>
>> lpty.c:345:5: warning: suggest explicit braces to avoid ambiguous 'else'
>> lpty.c:339:6: warning: unused variable 'done'
>>
>> But I had better let you decide the best way to fix those.

I also get:
lpty.c: In function ‘_lpty_sigchld_handler’:
lpty.c:41: warning: unused parameter ‘sig’

> 
> oops... shoulda done with -wall... thanks :)
> 
> Gunnar
> 
> 

Philipp