lua-users home
lua-l archive

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


On 5/8/07, Luiz Henrique de Figueiredo <> wrote:

The most recent version is still the one for Lua 5.0.
That version can be built under Lua 5.1 with a simple change:

<               int j=luaL_findstring(luaL_checkstring(L, i), S);
<               if (j==-1) luaL_argerror(L, i, "unknown selector");
>               int j=luaL_checkoption(L, i, NULL, S);

I had problem to compile luaposix in Xubuntu 7.04.
$ make
cc -fPIC -I/home/brunoos/local/lua-5.0/include -pedantic -Wall -O2
-c -o lposix.o lposix.c
lposix.c: In function 'Ftimes':
lposix.c:615: error: 'CLK_TCK' undeclared (first use in this function)
lposix.c:615: error: (Each undeclared identifier is reported only once
lposix.c:615: error: for each function it appears in.)
make: ** [lposix.o] Erro 1

$ man times

      The number of clock ticks per second can be obtained using
      In  POSIX-1996 the symbol CLK_TCK (defined in <time.h>) is mentioned as
      obsolescent. It is obsolete now."

I did a simple hack, defining CLK_TCK as sysconf(_SC_CLK_TCK) and it
compiles fine.