1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00
freebsd-ports/graphics/libv3d/files/patch-libv3d_disk.cpp
Martin Wilke c786ac8b75 - Fix build with gcc 4.2
PR:		118085
Submitted by:	Pietro Cerutti <gahr@gahr.ch>
Approved by:	portmgr (pav)
2007-11-21 14:57:50 +00:00

43 lines
1.1 KiB
C++

--- 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;