From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Nov 16 11:50:00 2007 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 EE26016A418 for ; Fri, 16 Nov 2007 11:50:00 +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 C5FFD13C44B for ; Fri, 16 Nov 2007 11:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lAGBo03j005088 for ; Fri, 16 Nov 2007 11:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lAGBo00L005087; Fri, 16 Nov 2007 11:50:00 GMT (envelope-from gnats) Resent-Date: Fri, 16 Nov 2007 11:50:00 GMT Resent-Message-Id: <200711161150.lAGBo00L005087@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, "Pietro Cerutti" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D96FD16A41A for ; Fri, 16 Nov 2007 11:43:51 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 643DF13C461 for ; Fri, 16 Nov 2007 11:43:50 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from 80-218-191-236.dclient.hispeed.ch ([80.218.191.236] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpa (Exim 4.63) (envelope-from ) id 1Iszbr-0006q8-FI for FreeBSD-gnats-submit@freebsd.org; Fri, 16 Nov 2007 12:43:43 +0100 Received: from gahrtop.localhost (localhost [127.0.0.1]) by gahrtop.localhost (Postfix) with ESMTP id 4A75E73063 for ; Fri, 16 Nov 2007 12:43:40 +0100 (CET) Message-Id: <1195213420.82876@gahrtop.localhost> Date: Fri, 16 Nov 2007 12:43:40 +0100 From: "Pietro Cerutti" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.8 Cc: Subject: ports/118085: [patch] graphics/libv3d unbreak fix build with GCC 4.2 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: Fri, 16 Nov 2007 11:50:01 -0000 >Number: 118085 >Category: ports >Synopsis: [patch] graphics/libv3d unbreak fix build with GCC 4.2 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 16 11:50:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Pietro Cerutti >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD 8.0-CURRENT #11: Wed Nov 14 20:31:46 CET 2007 root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034 >Description: - fixed "reinterpret_cast" nonsense - removed a few warnings >How-To-Repeat: cd /usr/ports/graphics/libv3d && make >Fix: --- _libv3d.diff begins here --- --- Makefile.orig 2007-11-16 12:26:20.000000000 +0100 +++ Makefile 2007-11-16 12:26:29.000000000 +0100 @@ -78,12 +78,6 @@ v3d_hf_options_struct.3 \ v3d_texture_ref_struct.3 -.include - -.if ${OSVERSION} >= 700042 -BROKEN= Broken with gcc 4.2 -.endif - post-patch: @${REINPLACE_CMD} -e "s,make,${GMAKE},g" ${WRKSRC}/Makefile @${REINPLACE_CMD} -e "s,%%CFLAGS%%,${CFLAGS},g" \ @@ -92,4 +86,4 @@ -e "s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g" \ ${WRKSRC}/libv3d/platforms.ini -.include +.include --- /dev/null 2007-11-16 12:39:07.000000000 +0100 +++ files/patch-libv3d_disk.cpp 2007-11-16 12:39:41.000000000 +0100 @@ -0,0 +1,42 @@ +--- libv3d/disk.cpp.orig 2007-11-16 12:27:26.000000000 +0100 ++++ libv3d/disk.cpp 2007-11-16 12:30:59.000000000 +0100 +@@ -120,12 +120,7 @@ + if(path == NULL) + return(0); + +- // Dan S: typecast is due to const. +-#if defined(__cplusplus) || defined(c_plusplus) +- while(ISBLANK(reinterpret_cast(*path))) +-#else + while(ISBLANK(*path)) +-#endif + path++; + + return((*path) == DIR_DELIMINATOR); +@@ -440,7 +435,7 @@ + /* Get enviroment value of HOME. */ + strptr = getenv("HOME"); + if(strptr == NULL) +- strptr = "/"; ++ strptr = (char *)"/"; + + /* Copy input path to return path. */ + strncpy(rtn_path, path, PATH_MAX); +@@ -1006,7 +1001,7 @@ + (child == NULL) || + (parent == child) + ) +- return("/"); ++ return((char *)"/"); + + /* If child is absolute, copy child and return. */ + if((*child) == DIR_DELIMINATOR) +@@ -1245,7 +1240,7 @@ + + + if(path == NULL) +- return("/"); ++ return((char *)"/"); + + i = 0; + strptr1 = path; --- /dev/null 2007-11-16 12:39:07.000000000 +0100 +++ files/patch-libv3d_string.cpp 2007-11-16 12:40:00.000000000 +0100 @@ -0,0 +1,81 @@ +--- libv3d/string.cpp.orig 2007-11-16 12:31:03.000000000 +0100 ++++ libv3d/string.cpp 2007-11-16 12:39:14.000000000 +0100 +@@ -1012,20 +1012,20 @@ + + /* Is string empty? */ + if(string == NULL) +- return(""); ++ return((char *)""); + if((string[0] == '\0') || + (string[0] == '\r') || + (string[0] == '\n') + ) +- return(""); ++ return((char *)""); + + /* Is string a comment? */ + if(StringIsComment(string, UNIXCFG_COMMENT_CHAR)) +- return(""); ++ return((char *)""); + + /* Does string have a delimiter? */ + if(strchr(string, CFG_PARAMETER_DELIMITER) == NULL) +- return(""); ++ return((char *)""); + + + /* Begin fetching value from string. */ +@@ -1295,7 +1295,7 @@ + static char arg[CS_DATA_MAX_LEN]; + + if(str == NULL) +- return(""); ++ return((char *)""); + + strncpy(arg, str, CS_DATA_MAX_LEN); + arg[CS_DATA_MAX_LEN - 1] = '\0'; +@@ -1309,7 +1309,7 @@ + return(strptr); + } + +- return(""); ++ return((char *)""); + } + + +@@ -1337,15 +1337,15 @@ + + + if(format == NULL) +- return(""); ++ return((char *)""); + if((*format) == '\0') +- return(""); ++ return((char *)""); + + /* Get current time. */ + time(¤t); + tm_ptr = localtime(¤t); + if(tm_ptr == NULL) +- return(""); ++ return((char *)""); + + /* Format time string. */ + len = strftime( +@@ -1377,13 +1377,13 @@ + + + if(format == NULL) +- return(""); ++ return((char *)""); + if((*format) == '\0') +- return(""); ++ return((char *)""); + + tm_ptr = localtime(&seconds); + if(tm_ptr == NULL) +- return(""); ++ return((char *)""); + + /* Format time string. */ + len = strftime( --- _libv3d.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: