lua-users home
lua-l archive

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


> On FreeBSD 7.4 I ran into a compile error while compiling Lua 5.2.0 from the
> source code:
> [bsimonds@carbon ~/src/lua-5.2.0]$ make freebsd
> ...
> gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX  -c liolib.c
> liolib.c: In function 'f_seek':
> liolib.c:543: error: 'off_t' undeclared (first use in this function)
> liolib.c:543: error: (Each undeclared identifier is reported only once
> liolib.c:543: error: for each function it appears in.)
> liolib.c:543: error: expected ';' before 'offset'
> liolib.c:544: error: 'offset' undeclared (first use in this function)

This seems weird. Both fseeko and ftello use the type 'off_t' in their
prototypes. If the compiler did not complain when reading the header
files, either their prototypes are missing from 'stdio.h' (where these
functions should be declared) or their prototypes are not using this
type. Both cases seem to break POSIX compliance. 

-- Roberto