From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 19 15:00:14 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA4110656A5 for ; Tue, 19 Aug 2008 15:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C0DA28FC12 for ; Tue, 19 Aug 2008 15:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7JF0EOU075887 for ; Tue, 19 Aug 2008 15:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7JF0ElJ075886; Tue, 19 Aug 2008 15:00:14 GMT (envelope-from gnats) Resent-Date: Tue, 19 Aug 2008 15:00:14 GMT Resent-Message-Id: <200808191500.m7JF0ElJ075886@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tim Niemueller Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 725B51065679 for ; Tue, 19 Aug 2008 14:54:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 66C668FC0C for ; Tue, 19 Aug 2008 14:54:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7JEsrPj008530 for ; Tue, 19 Aug 2008 14:54:53 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m7JEsrnG008529; Tue, 19 Aug 2008 14:54:53 GMT (envelope-from nobody) Message-Id: <200808191454.m7JEsrnG008529@www.freebsd.org> Date: Tue, 19 Aug 2008 14:54:53 GMT From: Tim Niemueller To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/126660: [patch] lang/tolua++: patch for compilation with GCC 4.3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 15:00:15 -0000 >Number: 126660 >Category: ports >Synopsis: [patch] lang/tolua++: patch for compilation with GCC 4.3 >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 19 15:00:14 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Tim Niemueller >Release: 7 >Organization: >Environment: FreeBSD barbossa 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: tolua++ needs a patch to eliminate many warnings when used with the GNU Compiler Collection 4.3. With the patch software that uses tolua++ can be compiled with "-Wall -Werror" again. >How-To-Repeat: >Fix: Attached patch eliminates the warnings. Patch attached with submission follows: --- include/tolua++.h.orig 2006-04-27 05:33:40.000000000 +0200 +++ include/tolua++.h 2008-03-13 23:20:12.000000000 +0100 @@ -53,7 +53,7 @@ #define TOLUA_NOPEER LUA_REGISTRYINDEX /* for lua 5.1 */ TOLUA_API const char* tolua_typename (lua_State* L, int lo); -TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err); +TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err); TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err); TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err); TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err); @@ -84,16 +84,15 @@ TOLUA_API int tolua_register_gc (lua_State* L, int lo); TOLUA_API int tolua_default_collect (lua_State* tolua_S); -TOLUA_API void tolua_usertype (lua_State* L, char* type); -TOLUA_API void tolua_beginmodule (lua_State* L, char* name); +TOLUA_API void tolua_usertype (lua_State* L, const char* type); +TOLUA_API void tolua_beginmodule (lua_State* L, const char* name); TOLUA_API void tolua_endmodule (lua_State* L); -TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar); -TOLUA_API void tolua_class (lua_State* L, char* name, char* base); -TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base, lua_CFunction col); -TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func); -TOLUA_API void tolua_constant (lua_State* L, char* name, double value); -TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get, lua_CFunction set); -TOLUA_API void tolua_array (lua_State* L,char* name, lua_CFunction get, lua_CFunction set); +TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar); +TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const char* base, lua_CFunction col); +TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func); +TOLUA_API void tolua_constant (lua_State* L, const char* name, double value); +TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set); +TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set); /* TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type); */ /* TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base); */ --- src/lib/tolua_is.c.orig 2005-12-19 02:13:05.000000000 +0100 +++ src/lib/tolua_is.c 2008-03-13 23:11:27.000000000 +0100 @@ -85,7 +85,7 @@ return lua_tostring(L,-1); } -TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err) +TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err) { if (msg[0] == '#') { --- src/lib/tolua_map.c.orig 2006-03-13 23:37:49.000000000 +0100 +++ src/lib/tolua_map.c 2008-03-13 23:21:58.000000000 +0100 @@ -389,7 +389,7 @@ * It creates the correspoding metatable in the registry, for both 'type' and 'const type'. * It maps 'const type' as being also a 'type' */ -TOLUA_API void tolua_usertype (lua_State* L, char* type) +TOLUA_API void tolua_usertype (lua_State* L, const char* type) { char ctype[128] = "const "; strncat(ctype,type,120); @@ -403,7 +403,7 @@ /* Begin module * It pushes the module (or class) table on the stack */ -TOLUA_API void tolua_beginmodule (lua_State* L, char* name) +TOLUA_API void tolua_beginmodule (lua_State* L, const char* name) { if (name) { @@ -426,7 +426,7 @@ * It creates a new module */ #if 1 -TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar) +TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar) { if (name) { @@ -462,7 +462,7 @@ lua_pop(L,1); /* pop module */ } #else -TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar) +TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar) { if (name) { @@ -518,7 +518,7 @@ /* Map C class * It maps a C class, setting the appropriate inheritance and super classes. */ -TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base, lua_CFunction col) +TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const char* base, lua_CFunction col) { char cname[128] = "const "; char cbase[128] = "const "; @@ -577,7 +577,7 @@ /* Map function * It assigns a function into the current module (or class) */ -TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func) +TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func) { lua_pushstring(L,name); lua_pushcfunction(L,func); @@ -600,7 +600,7 @@ /* Map constant number * It assigns a constant number into the current module (or class) */ -TOLUA_API void tolua_constant (lua_State* L, char* name, double value) +TOLUA_API void tolua_constant (lua_State* L, const char* name, double value) { lua_pushstring(L,name); tolua_pushnumber(L,value); @@ -611,7 +611,7 @@ /* Map variable * It assigns a variable into the current module (or class) */ -TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get, lua_CFunction set) +TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set) { /* get func */ lua_pushstring(L,".get"); @@ -663,7 +663,7 @@ /* Map an array * It assigns an array into the current module (or class) */ -TOLUA_API void tolua_array (lua_State* L, char* name, lua_CFunction get, lua_CFunction set) +TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set) { lua_pushstring(L,".get"); lua_rawget(L,-2); >Release-Note: >Audit-Trail: >Unformatted: