FreeBSD Bugzilla – Attachment 99052 Details for
Bug 138055
net/luasocket namespace clash with www/lighttpd mod_magnet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 9.68 KB, created by
Robert Nagy
on 2009-08-21 23:00:12 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Robert Nagy
Created:
2009-08-21 23:00:12 UTC
Size:
9.68 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/net/luasocket/Makefile,v >retrieving revision 1.12 >diff -u -r1.12 Makefile >--- Makefile 9 Jul 2009 03:57:57 -0000 1.12 >+++ Makefile 21 Aug 2009 21:22:24 -0000 >@@ -7,6 +7,7 @@ > > PORTNAME= luasocket > PORTVERSION= 2.0.2 >+PORTREVISION= 1 > CATEGORIES= net > MASTER_SITES= http://luaforge.net/frs/download.php/2664/ > PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX} >Index: files/patch-src_buffer_c >=================================================================== >RCS file: files/patch-src_buffer_c >diff -N files/patch-src_buffer_c >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/patch-src_buffer_c 21 Aug 2009 21:22:24 -0000 >@@ -0,0 +1,233 @@ >+diff -ru src/buffer.c src/buffer.c >+--- src/buffer.c 2008-08-20 06:16:42 +0000 >++++ src/buffer.c 2008-08-20 06:30:15 +0000 >+@@ -33,7 +33,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * Initializes module >+ \*-------------------------------------------------------------------------*/ >+-int buffer_open(lua_State *L) { >++int ls_buffer_open(lua_State *L) { >+ (void) L; >+ return 0; >+ } >+@@ -41,7 +41,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * Initializes C structure >+ \*-------------------------------------------------------------------------*/ >+-void buffer_init(p_buffer buf, p_io io, p_timeout tm) { >++void ls_buffer_init(p_buffer buf, p_io io, p_timeout tm) { >+ buf->first = buf->last = 0; >+ buf->io = io; >+ buf->tm = tm; >+@@ -52,7 +52,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * object:getstats() interface >+ \*-------------------------------------------------------------------------*/ >+-int buffer_meth_getstats(lua_State *L, p_buffer buf) { >++int ls_buffer_meth_getstats(lua_State *L, p_buffer buf) { >+ lua_pushnumber(L, buf->received); >+ lua_pushnumber(L, buf->sent); >+ lua_pushnumber(L, timeout_gettime() - buf->birthday); >+@@ -62,7 +62,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * object:setstats() interface >+ \*-------------------------------------------------------------------------*/ >+-int buffer_meth_setstats(lua_State *L, p_buffer buf) { >++int ls_buffer_meth_setstats(lua_State *L, p_buffer buf) { >+ buf->received = (long) luaL_optnumber(L, 2, buf->received); >+ buf->sent = (long) luaL_optnumber(L, 3, buf->sent); >+ if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4); >+@@ -73,7 +73,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * object:send() interface >+ \*-------------------------------------------------------------------------*/ >+-int buffer_meth_send(lua_State *L, p_buffer buf) { >++int ls_buffer_meth_send(lua_State *L, p_buffer buf) { >+ int top = lua_gettop(L); >+ int err = IO_DONE; >+ size_t size = 0, sent = 0; >+@@ -106,7 +106,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * object:receive() interface >+ \*-------------------------------------------------------------------------*/ >+-int buffer_meth_receive(lua_State *L, p_buffer buf) { >++int ls_buffer_meth_receive(lua_State *L, p_buffer buf) { >+ int err = IO_DONE, top = lua_gettop(L); >+ luaL_Buffer b; >+ size_t size; >+@@ -149,7 +149,7 @@ >+ /*-------------------------------------------------------------------------*\ >+ * Determines if there is any data in the read buffer >+ \*-------------------------------------------------------------------------*/ >+-int buffer_isempty(p_buffer buf) { >++int ls_buffer_isempty(p_buffer buf) { >+ return buf->first >= buf->last; >+ } >+ >+@@ -244,7 +244,7 @@ >+ static void buffer_skip(p_buffer buf, size_t count) { >+ buf->received += count; >+ buf->first += count; >+- if (buffer_isempty(buf)) >++ if (ls_buffer_isempty(buf)) >+ buf->first = buf->last = 0; >+ } >+ >+@@ -256,7 +256,7 @@ >+ int err = IO_DONE; >+ p_io io = buf->io; >+ p_timeout tm = buf->tm; >+- if (buffer_isempty(buf)) { >++ if (ls_buffer_isempty(buf)) { >+ size_t got; >+ err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm); >+ buf->first = 0; >+diff -ru src/buffer.h src/buffer.h >+--- src/buffer.h 2008-08-20 06:16:42 +0000 >++++ src/buffer.h 2008-08-20 06:30:15 +0000 >+@@ -36,12 +36,12 @@ >+ } t_buffer; >+ typedef t_buffer *p_buffer; >+ >+-int buffer_open(lua_State *L); >+-void buffer_init(p_buffer buf, p_io io, p_timeout tm); >+-int buffer_meth_send(lua_State *L, p_buffer buf); >+-int buffer_meth_receive(lua_State *L, p_buffer buf); >+-int buffer_meth_getstats(lua_State *L, p_buffer buf); >+-int buffer_meth_setstats(lua_State *L, p_buffer buf); >+-int buffer_isempty(p_buffer buf); >++int ls_buffer_open(lua_State *L); >++void ls_buffer_init(p_buffer buf, p_io io, p_timeout tm); >++int ls_buffer_meth_send(lua_State *L, p_buffer buf); >++int ls_buffer_meth_receive(lua_State *L, p_buffer buf); >++int ls_buffer_meth_getstats(lua_State *L, p_buffer buf); >++int ls_buffer_meth_setstats(lua_State *L, p_buffer buf); >++int ls_buffer_isempty(p_buffer buf); >+ >+ #endif /* BUF_H */ >+diff -ru src/luasocket.c src/luasocket.c >+--- src/luasocket.c 2008-08-20 06:16:42 +0000 >++++ src/luasocket.c 2008-08-20 06:30:15 +0000 >+@@ -51,7 +51,7 @@ >+ {"auxiliar", auxiliar_open}, >+ {"except", except_open}, >+ {"timeout", timeout_open}, >+- {"buffer", buffer_open}, >++ {"buffer", ls_buffer_open}, >+ {"inet", inet_open}, >+ {"tcp", tcp_open}, >+ {"udp", udp_open}, >+diff -ru src/tcp.c src/tcp.c >+--- src/tcp.c 2008-08-20 06:16:42 +0000 >++++ src/tcp.c 2008-08-20 06:30:15 +0000 >+@@ -104,22 +104,22 @@ >+ \*-------------------------------------------------------------------------*/ >+ static int meth_send(lua_State *L) { >+ p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); >+- return buffer_meth_send(L, &tcp->buf); >++ return ls_buffer_meth_send(L, &tcp->buf); >+ } >+ >+ static int meth_receive(lua_State *L) { >+ p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); >+- return buffer_meth_receive(L, &tcp->buf); >++ return ls_buffer_meth_receive(L, &tcp->buf); >+ } >+ >+ static int meth_getstats(lua_State *L) { >+ p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); >+- return buffer_meth_getstats(L, &tcp->buf); >++ return ls_buffer_meth_getstats(L, &tcp->buf); >+ } >+ >+ static int meth_setstats(lua_State *L) { >+ p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); >+- return buffer_meth_setstats(L, &tcp->buf); >++ return ls_buffer_meth_setstats(L, &tcp->buf); >+ } >+ >+ /*-------------------------------------------------------------------------*\ >+@@ -152,7 +152,7 @@ >+ static int meth_dirty(lua_State *L) >+ { >+ p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); >+- lua_pushboolean(L, !buffer_isempty(&tcp->buf)); >++ lua_pushboolean(L, !ls_buffer_isempty(&tcp->buf)); >+ return 1; >+ } >+ >+@@ -176,7 +176,7 @@ >+ io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, >+ (p_error) socket_ioerror, &clnt->sock); >+ timeout_init(&clnt->tm, -1, -1); >+- buffer_init(&clnt->buf, &clnt->io, &clnt->tm); >++ ls_buffer_init(&clnt->buf, &clnt->io, &clnt->tm); >+ return 1; >+ } else { >+ lua_pushnil(L); >+@@ -329,7 +329,7 @@ >+ io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, >+ (p_error) socket_ioerror, &tcp->sock); >+ timeout_init(&tcp->tm, -1, -1); >+- buffer_init(&tcp->buf, &tcp->io, &tcp->tm); >++ ls_buffer_init(&tcp->buf, &tcp->io, &tcp->tm); >+ return 1; >+ } else { >+ lua_pushnil(L); >+diff -ru src/unix.c src/unix.c >+--- src/unix.c 2008-08-20 06:16:42 +0000 >++++ src/unix.c 2008-08-20 06:30:15 +0000 >+@@ -105,22 +105,22 @@ >+ \*-------------------------------------------------------------------------*/ >+ static int meth_send(lua_State *L) { >+ p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1); >+- return buffer_meth_send(L, &un->buf); >++ return ls_buffer_meth_send(L, &un->buf); >+ } >+ >+ static int meth_receive(lua_State *L) { >+ p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1); >+- return buffer_meth_receive(L, &un->buf); >++ return ls_buffer_meth_receive(L, &un->buf); >+ } >+ >+ static int meth_getstats(lua_State *L) { >+ p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1); >+- return buffer_meth_getstats(L, &un->buf); >++ return ls_buffer_meth_getstats(L, &un->buf); >+ } >+ >+ static int meth_setstats(lua_State *L) { >+ p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1); >+- return buffer_meth_setstats(L, &un->buf); >++ return ls_buffer_meth_setstats(L, &un->buf); >+ } >+ >+ /*-------------------------------------------------------------------------*\ >+@@ -149,7 +149,7 @@ >+ >+ static int meth_dirty(lua_State *L) { >+ p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1); >+- lua_pushboolean(L, !buffer_isempty(&un->buf)); >++ lua_pushboolean(L, !ls_buffer_isempty(&un->buf)); >+ return 1; >+ } >+ >+@@ -172,7 +172,7 @@ >+ io_init(&clnt->io, (p_send)socket_send, (p_recv)socket_recv, >+ (p_error) socket_ioerror, &clnt->sock); >+ timeout_init(&clnt->tm, -1, -1); >+- buffer_init(&clnt->buf, &clnt->io, &clnt->tm); >++ ls_buffer_init(&clnt->buf, &clnt->io, &clnt->tm); >+ return 1; >+ } else { >+ lua_pushnil(L); >+@@ -346,7 +346,7 @@ >+ io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, >+ (p_error) socket_ioerror, &un->sock); >+ timeout_init(&un->tm, -1, -1); >+- buffer_init(&un->buf, &un->io, &un->tm); >++ ls_buffer_init(&un->buf, &un->io, &un->tm); >+ return 1; >+ } else { >+ lua_pushnil(L);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 138055
: 99052