NetBSD Problem Report #15920
Received: (qmail 26792 invoked from network); 15 Mar 2002 00:21:23 -0000
Message-Id: <20020315002216.6077868ED2@hiro.dyn.dhs.org>
Date: Fri, 15 Mar 2002 01:22:16 +0100 (CET)
From: wiz@netbsd.org
Reply-To: wiz@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: curses vs. ncurses: ERR/OK definition mismatch
X-Send-Pr-Version: 3.95
>Number: 15920
>Category: lib
>Synopsis: curses vs. ncurses: ERR/OK definition mismatch
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: blymn
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 15 00:22:00 +0000 2002
>Closed-Date: Tue Apr 01 18:31:16 +0000 2003
>Last-Modified: Tue Mar 23 21:36:00 +0000 2004
>Originator: Thomas Klausner
>Release: NetBSD 1.5ZB
>Organization:
>Environment:
System: NetBSD hiro 1.5ZB NetBSD 1.5ZB (HIRO) #0: Wed Mar 13 01:43:46 CET 2002 wiz@hiro:/archive/cvs/src/sys/arch/i386/compile/HIRO i386
Architecture: i386
Machine: i386
>Description:
In ncurses-5.2's ncurses.h, ERR is defined to be -1, and OK 0.
In NetBSD's curses.h, ERR is 0, and OK is 1.
This will probably lead to compatibility problems.
>How-To-Repeat:
Compare the two header files.
>Fix:
Change ERR and OK in curses.h to -1 and 0 respectively, and audit
the curses code on hidden assumptions?
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: lib-bug-people->blymn
Responsible-Changed-By: wiz
Responsible-Changed-When: Thu Mar 14 16:22:34 PST 2002
Responsible-Changed-Why:
blymn said he'd take a look at this.
From: matthew green <mrg@eterna.com.au>
To: wiz@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: re: lib/15920: curses vs. ncurses: ERR/OK definition mismatch
Date: Fri, 15 Mar 2002 12:11:17 +1100
System: NetBSD hiro 1.5ZB NetBSD 1.5ZB (HIRO) #0: Wed Mar 13 01:43:46 CET 2002 wiz@hiro:/archive/cvs/src/sys/arch/i386/compile/HIRO i386
Architecture: i386
Machine: i386
>Description:
In ncurses-5.2's ncurses.h, ERR is defined to be -1, and OK 0.
In NetBSD's curses.h, ERR is 0, and OK is 1.
This will probably lead to compatibility problems.
>How-To-Repeat:
Compare the two header files.
>Fix:
Change ERR and OK in curses.h to -1 and 0 respectively, and audit
the curses code on hidden assumptions?
i don't see why this is a problem and changing it changes our
ABI yet again? people shouldn't link code with ncurses.h and
curses.h together, that's going to blow up more than just this.
From: Julian Coleman <jdc@coris.demon.co.uk>
To: wiz@netbsd.org
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/15920: curses vs. ncurses: ERR/OK definition mismatch
Date: Tue, 1 Apr 2003 18:38:01 +0100
> >Fix:
> Change ERR and OK in curses.h to -1 and 0 respectively, and audit
> the curses code on hidden assumptions?
As MRG mentioned, I'm not sure that this is a problem. The specification
notes that functions return ERR and OK and that these are defined in
curses.h. No mention is made of explicit values for them. As long as a
program uses curses.h, everything should be fine.
Can the PR be closed and this looked at if there is a problem with a package?
Thanks,
J
--
My other computer also runs NetBSD
http://www.netbsd.org/
From: Thomas Klausner <wiz@netbsd.org>
To: Julian Coleman <jdc@coris.demon.co.uk>
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/15920: curses vs. ncurses: ERR/OK definition mismatch
Date: Tue, 1 Apr 2003 19:49:02 +0200
On Tue, Apr 01, 2003 at 06:38:01PM +0100, Julian Coleman wrote:
> As MRG mentioned, I'm not sure that this is a problem. The specification
> notes that functions return ERR and OK and that these are defined in
> curses.h. No mention is made of explicit values for them. As long as a
> program uses curses.h, everything should be fine.
>
> Can the PR be closed and this looked at if there is a problem with a package?
It was prompted by a problem in pkgsrc/games/frotz, but I think this has
been fixed in its sources now.
Brett asked me to send a PR when I mentioned the difference.
It is fine with me to close it.
Thomas
From: Julian Coleman <jdc@coris.demon.co.uk>
To: Thomas Klausner <wiz@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/15920: curses vs. ncurses: ERR/OK definition mismatch
Date: Tue, 1 Apr 2003 19:29:24 +0100
> It was prompted by a problem in pkgsrc/games/frotz, but I think this has
> been fixed in its sources now.
Ah. I missed that.
> It is fine with me to close it.
Great! Thanks,
J
(bug team hat on ;-)
--
My other computer also runs NetBSD
http://www.netbsd.org/
State-Changed-From-To: open->closed
State-Changed-By: jdc
State-Changed-When: Tue Apr 1 10:30:48 PST 2003
State-Changed-Why:
Problem fixed in package.
From: Julian Coleman <jdc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/15920 CVS commit: src/lib/libcurses
Date: Tue, 23 Mar 2004 21:35:29 +0000 (UTC)
Module Name: src
Committed By: jdc
Date: Tue Mar 23 21:35:29 UTC 2004
Modified Files:
src/lib/libcurses: curses.h
Log Message:
Change the values of ERR and OK.
This makes our getch() and related functions conform to SUSv2.
Also fixes PR lib/15920.
XXX: This causes an API incompatability, but comes less than 27 hours after
the libcurses major number was incremented, so should have minimal impact.
To generate a diff of this commit:
cvs rdiff -r1.84 -r1.85 src/lib/libcurses/curses.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.