Subject: pkg/13192: ircII-20001231 broken on sgimips
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@netbsd.org>
List: netbsd-bugs
Date: 06/13/2001 15:49:44
>Number: 13192
>Category: pkg
>Synopsis: pkgsrc ircII doesn't build on mips platforms due to bad #defines
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 13 12:49:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Rafal Boni
>Release: pkgsrc CVS updated on 6/6/2001
>Organization:
Not today
>Environment:
System: NetBSD teal 1.5W NetBSD 1.5W (TEAL) #2: Wed Jun 13 08:25:16 EDT 2001 rafal@cyclops:/extra/src-current/sys/arch/sgimips/compile/TEAL sgimips
>Description:
include/ircterm.h does the following:
#ifdef mips
# define fputc(c,f) write(1,&(c),1)
# define fwrite(buffer,len,cnt,f) write(1,buffer,len)
#endif /*mips*/
Which obviously won't work if c is a character constant.
>How-To-Repeat:
Try to build ircII-20001231 (from pkgsrc) on sgimips or any other
mips platform NetBSD supports.
>Fix:
Add the following file as `patch-ab' and do the makepatchsum magic. This
doesn't fix the underlying bad assumption, but it does make the build go
on NetBSD.
---8<-------8<-------8<-------8<-------8<-------8<-------8<----
$NetBSD$
--- include/ircterm.h.orig Wed Jun 13 15:36:59 2001
+++ include/ircterm.h Wed Jun 13 15:37:49 2001
@@ -238,8 +238,8 @@
#endif /* _HPUX_SOURCE */
-/* well, it works */
-#ifdef mips
+/* cough, cough... This doesn't work (since c is often a char constant) */
+#if defined(mips) && !defined(__NetBSD__)
# define fputc(c,f) write(1,&(c),1)
# define fwrite(buffer,len,cnt,f) write(1,buffer,len)
#endif /*mips*/
---8<-------8<-------8<-------8<-------8<-------8<-------8<----
>Release-Note:
>Audit-Trail:
>Unformatted: