diff options
-rw-r--r-- | lang/lua/Makefile | 1 | ||||
-rw-r--r-- | lang/lua/files/patch-ab | 20 | ||||
-rw-r--r-- | lang/lua4/Makefile | 1 | ||||
-rw-r--r-- | lang/lua4/files/patch-ab | 20 | ||||
-rw-r--r-- | lang/lua50/Makefile | 1 | ||||
-rw-r--r-- | lang/lua50/files/patch-ab | 20 |
6 files changed, 63 insertions, 0 deletions
diff --git a/lang/lua/Makefile b/lang/lua/Makefile index 61964f909e39..c351e33e24af 100644 --- a/lang/lua/Makefile +++ b/lang/lua/Makefile @@ -7,6 +7,7 @@ PORTNAME= lua PORTVERSION= 4.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ ftp://csg.uwaterloo.ca/pub/lhf/lua/ \ diff --git a/lang/lua/files/patch-ab b/lang/lua/files/patch-ab new file mode 100644 index 000000000000..b7fbfba0f970 --- /dev/null +++ b/lang/lua/files/patch-ab @@ -0,0 +1,20 @@ +--- src/lib/lmathlib.c.orig Mon Apr 30 00:05:45 2001 ++++ src/lib/lmathlib.c Mon Apr 30 00:06:05 2001 +@@ -168,7 +168,7 @@ + static int math_random (lua_State *L) { + /* the '%' avoids the (rare) case of r==1, and is needed also because on + some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */ +- double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; ++ double r = (double)(random()%RAND_MAX) / (double)RAND_MAX; + switch (lua_gettop(L)) { /* check number of arguments */ + case 0: { /* no arguments */ + lua_pushnumber(L, r); /* Number between 0 and 1 */ +@@ -194,7 +194,7 @@ + + + static int math_randomseed (lua_State *L) { +- srand(luaL_check_int(L, 1)); ++ srandom(luaL_check_int(L, 1)); + return 0; + } + diff --git a/lang/lua4/Makefile b/lang/lua4/Makefile index 61964f909e39..c351e33e24af 100644 --- a/lang/lua4/Makefile +++ b/lang/lua4/Makefile @@ -7,6 +7,7 @@ PORTNAME= lua PORTVERSION= 4.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ ftp://csg.uwaterloo.ca/pub/lhf/lua/ \ diff --git a/lang/lua4/files/patch-ab b/lang/lua4/files/patch-ab new file mode 100644 index 000000000000..b7fbfba0f970 --- /dev/null +++ b/lang/lua4/files/patch-ab @@ -0,0 +1,20 @@ +--- src/lib/lmathlib.c.orig Mon Apr 30 00:05:45 2001 ++++ src/lib/lmathlib.c Mon Apr 30 00:06:05 2001 +@@ -168,7 +168,7 @@ + static int math_random (lua_State *L) { + /* the '%' avoids the (rare) case of r==1, and is needed also because on + some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */ +- double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; ++ double r = (double)(random()%RAND_MAX) / (double)RAND_MAX; + switch (lua_gettop(L)) { /* check number of arguments */ + case 0: { /* no arguments */ + lua_pushnumber(L, r); /* Number between 0 and 1 */ +@@ -194,7 +194,7 @@ + + + static int math_randomseed (lua_State *L) { +- srand(luaL_check_int(L, 1)); ++ srandom(luaL_check_int(L, 1)); + return 0; + } + diff --git a/lang/lua50/Makefile b/lang/lua50/Makefile index 61964f909e39..c351e33e24af 100644 --- a/lang/lua50/Makefile +++ b/lang/lua50/Makefile @@ -7,6 +7,7 @@ PORTNAME= lua PORTVERSION= 4.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ ftp://csg.uwaterloo.ca/pub/lhf/lua/ \ diff --git a/lang/lua50/files/patch-ab b/lang/lua50/files/patch-ab new file mode 100644 index 000000000000..b7fbfba0f970 --- /dev/null +++ b/lang/lua50/files/patch-ab @@ -0,0 +1,20 @@ +--- src/lib/lmathlib.c.orig Mon Apr 30 00:05:45 2001 ++++ src/lib/lmathlib.c Mon Apr 30 00:06:05 2001 +@@ -168,7 +168,7 @@ + static int math_random (lua_State *L) { + /* the '%' avoids the (rare) case of r==1, and is needed also because on + some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */ +- double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; ++ double r = (double)(random()%RAND_MAX) / (double)RAND_MAX; + switch (lua_gettop(L)) { /* check number of arguments */ + case 0: { /* no arguments */ + lua_pushnumber(L, r); /* Number between 0 and 1 */ +@@ -194,7 +194,7 @@ + + + static int math_randomseed (lua_State *L) { +- srand(luaL_check_int(L, 1)); ++ srandom(luaL_check_int(L, 1)); + return 0; + } + |