Subject: pkg/25617: pkgsrc/textproc/isearch
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <john@johnrshannon.com>
List: pkgsrc-bugs
Date: 05/17/2004 13:50:24
>Number:         25617
>Category:       pkg
>Synopsis:       Two syntax errors prevent compilation with gcc-3.4.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 17 19:51:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     John R. Shannon
>Release:        NetBSD 2.0E
>Organization:
	johnrshannon.com
>Environment:
System: NetBSD colleen.internal.johnrshannon.com 2.0E NetBSD 2.0E (KERNEL) #0: Thu May 13 06:22:04 MDT 2004 root@colleen.internal.johnrshannon.com:/usr/obj/usr/src/sys/arch/i386/compile/KERNEL i386
Architecture: i386
Machine: i386
Compiler: gcc (GCC) 3.4.0
>Description:
	Two syntax errors prevent compilation with gcc-3.4.0:
	1) "A default argument cannot be redefined by a later declaration
	    (not even to the same value)" C++ Reference Manual 8.2.6
	2) A UCHAR* must be cast to a char*
>How-To-Repeat:
	
>Fix:
	Two patches:


$NetBSD$

--- src/registry.cxx.orig	2000-08-21 06:55:02.000000000 -0600
+++ src/registry.cxx
@@ -326,20 +326,7 @@ void REGISTRY::Print(ostream& os, const 
 }
 */
 
-#ifdef UNIX
-
-#ifdef SGI_CC
-void 
-REGISTRY::fprint(FILE* fp, const INT level) const 
-#else
-void 
-REGISTRY::fprint(FILE* fp, const INT level = 0) const 
-#endif
-
-#else
-void 
-REGISTRY::fprint(FILE* fp, const INT level) const 
-#endif
+void REGISTRY::fprint(FILE* fp, const INT level) const 
 {
 	INT x;
 	for (x=0; x < level; x++) {



$NetBSD$

--- src/string.cxx.orig	2000-10-30 23:22:09.000000000 -0700
+++ src/string.cxx
@@ -574,7 +574,7 @@ STRING::Print(PFILE FilePointer) const {
 
 // can this be const STRING& ?
 ostream& operator<<(ostream& os, const STRING& str) {
-  os.write(str.Buffer, str.Length);
+  os.write((char*)str.Buffer, str.Length);
   return os;
 }
 
>Release-Note:
>Audit-Trail:
>Unformatted: