Date: Fri, 16 Nov 2007 12:43:40 +0100 From: "Pietro Cerutti" <gahr@gahr.ch> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/118085: [patch] graphics/libv3d unbreak fix build with GCC 4.2 Message-ID: <1195213420.82876@gahrtop.localhost> Resent-Message-ID: <200711161150.lAGBo00L005087@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <bsd.port.pre.mk> - -.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 <bsd.port.post.mk> +.include <bsd.port.mk> --- /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<char>(*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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1195213420.82876>