pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42294: g++ v4.4 is picky about casts



>Number:         42294
>Category:       pkg
>Synopsis:       g++ v4.4 is picky about casts
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 09 04:35:03 +0000 2009
>Originator:     Steven Drake
>Release:        pkgsrc-2009Q3
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 
pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1, by Roland McGrath et al.
>Description:
g++ version 4.4 gives 'error: invalid conversion' for some function call.

Packages: x11/fltk & print/xpp

>Example:
g++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DX_DISPLAY_MISSING=1 -DHAVE_LIBX11=1 
-DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 
-DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 
-DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/pkg/include -I/usr/include 
  -I/usr/pkg/include -Wno-error -O2 -pipe -march=i586 -mtune=generic 
-I/usr/pkg/include -D_THREAD_SAFE -D_REENTRANT -Wno-error -O2 -pipe -march=i586 
-mtune=generic -I/usr/pkg/include -I/usr/include -c xpp.cxx
xpp.cxx: In constructor 'printFiles::printFiles(int, char**, int&)':
xpp.cxx:171: error: invalid conversion from 'const char*' to 'char*'


>Fix:
Index: pkgsrc/x11/fltk/patches/patch-ah
===================================================================
--- /dev/null
+++ pkgsrc/x11/fltk/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/filename_list.cxx.orig 2006-06-10 04:16:34.000000000 +1200
++++ src/filename_list.cxx
+@@ -54,7 +54,7 @@ int fl_filename_list(const char *d, dire
+                      Fl_File_Sort_F *sort) {
+ #ifndef HAVE_SCANDIR
+   int n = scandir(d, list, 0, sort);
+-#elif defined(__hpux) || defined(__CYGWIN__)
++#elif defined(__hpux) || defined(__CYGWIN__) || (defined(__GNUC__) && 
__GNUC__ >= 4)
+   // HP-UX, Cygwin define the comparison function like this:
+   int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
+ #elif defined(__osf__)
Index: pkgsrc/print/xpp/patches/patch-ae
===================================================================
--- /dev/null
+++ pkgsrc/print/xpp/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- xpp.cxx.orig       2004-12-07 08:00:04.000000000 +1300
++++ xpp.cxx
+@@ -168,7 +168,7 @@ printFiles::printFiles(int  argc, /* I -
+           {     
+             char *tmp;
+ 
+-            if ((tmp = strchr(dest,'/'))) {
++            if ((tmp = strchr((char*)dest,'/'))) {
+               tmp[0] = '\0';
+               instance = tmp + 1;
+             } 

-- 
Steven



Home | Main Index | Thread Index | Old Index