Date: Sat, 23 Apr 2011 19:46:10 GMT From: Stephen Hurd <shurd@sasktel.net> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/156601: New dialog.h undefines ERR making curses macros unavailable Message-ID: <201104231946.p3NJkATt032908@red.freebsd.org> Resent-Message-ID: <201104231950.p3NJoCbh077820@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156601
>Category: misc
>Synopsis: New dialog.h undefines ERR making curses macros unavailable
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Apr 23 19:50:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Stephen Hurd
>Release: 9.0-CURRENT
>Organization:
>Environment:
FreeBSD 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Sat Apr 23 10:37:10 UTC 2011 root@:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The new dialog.h on line 47 undefines the ERR macro with a comment of "header conflict with Solaris xpg4" this means that if n?curses.h is included before dialog.h, ERR becomes undefined and the various macros in curses.h (ie: getmaxy()) break.
Since our curses.h #undef's ERR itself, there is no need for this in FreeBSD, and since it requires specific #include ordering for no good reason, it should be removed.
>How-To-Repeat:
#include <curses.h>
#include <dialog.h>
#include <stdio.h>
int main(int argc, char **argv)
{
initscr();
fprintf(stderr, "%d\n", getmaxy(stdscr));
endwin();
return 0;
}
>Fix:
Remove line 47 of dialog.h for FreeBSD
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104231946.p3NJkATt032908>
