[syslinux] Lua.c32 - user input / scripting

e h ehouston3 at yahoo.com
Tue May 17 20:10:18 PDT 2011


>>On 05/17/2011 05:21 AM, e h wrote:
>> 
>> I noticed that once I
 removed the "#ifndef syslinux/ #endif" blocks the "liolib.c" code 
compiled with warnings regarding several of the functions (fscanf, 
ungetc, clearerr, etc..)  These appear to >>be normally located in 
"stdio.h"  I compared the "stdio.h" in my /usr/.../include directory to 
the one in the /com32/.../include directory.  These functions aren't 
defined in the stdio in the /com32 >>directory.  I did see some functions 
that looked similar?  I may just be able to modify "liolib.c" to 
reference the actual functions in the /com32/.../include/stdio.h
>> 
>>
>If there are stdio functions which lua needs which are missing, please
>just give me a list and I can probably just make them happen.
>
>   -hpa

Functions:
fscanf
ungetc
clearerr
fseek
setvbuf

... The sections of "liolib.c" containing those functions were blocked with "#ifndef SYSLINUX/ #endif" markers.  I'm not much of  programmer, hope that helps.  Below are the errors that are generated:
bash-4.1# make
gcc -Wp,-MT,liolib.o,-MD,./.liolib.o.d -std=gnu99 -m32 -fno-stack-protector -fwrapv -freg-struct-return -mregparm=3 -DREGPARM=3 -march=i386 -Os -fPIE -fno-exceptions -fno-asynchronous-unwind-tables -fno-strict-aliasing -falign-functions=0 -falign-jumps=0 -falign-labels=0 -falign-loops=0 -mpreferred-stack-boundary=2  -W -Wall -Wstrict-prototypes -march=i386 -fomit-frame-pointer -D__COM32__ -nostdinc -iwithprefix include -I../../../com32/libutil/include -I../../../com32/include -I../../../com32/gplinclude -DSYSLINUX -DLUA_ANSI -c -o liolib.o liolib.c
liolib.c: In function 'io_tmpfile':
liolib.c:185: warning: implicit declaration of function 'tmpfile'
liolib.c:185: warning: assignment makes pointer from integer without a cast
liolib.c: In function 'read_number':
liolib.c:274: warning: implicit declaration of function 'fscanf'
liolib.c:274: warning: incompatible implicit declaration of built-in function 'fscanf'
liolib.c: In function 'test_eof':
liolib.c:287: warning: implicit declaration of function 'ungetc'
liolib.c: In function 'g_read':
liolib.c:335: warning: implicit declaration of function 'clearerr'
liolib.c: In function 'f_seek':
liolib.c:444: warning: implicit declaration of function 'fseek'
liolib.c: In function 'f_setvbuf':
liolib.c:455: error: '_IONBF' undeclared (first use in this function)
liolib.c:455: error: (Each undeclared identifier is reported only once
liolib.c:455: error: for each function it appears in.)
liolib.c:455: error: '_IOFBF' undeclared (first use in this function)
liolib.c:455: error: '_IOLBF' undeclared (first use in this function)
liolib.c:460: warning: implicit declaration of function 'setvbuf'
make: *** [liolib.o] Error 1
bash-4.1# 


Regards,

EH





More information about the Syslinux mailing list