Opened 15 years ago

Closed 15 years ago

#21277 closed defect (invalid)

Snow Leopard: NCURSES_OPAQUE disables ncurses

Reported by: every_step_i_destroy@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc: nerdling (Jeremy Lavergne)
Port:

Description

I think "curses" library is not a negligible library, so I think this problem is important.

In Mac OSX Snow Leopard, "NCURSES_OPAQUE" is defined in /usr/include/curses.h as follows:

/*
 * Definition used to make WINDOW and similar structs opaque.
 */
#ifndef NCURSES_OPAQUE
#define NCURSES_OPAQUE 1
#endif

This NCURSES_OPAQUE is nasty. Unless you define NCURSES_OPAQUE as 0 before including curses.h, WINDOW struct and a lot of important definitions are left out, thus making most source code using curses helpless.

Solution is simple, pass "-DNCURSES_OPAQUE=0" to gcc or put "#define NCURSES_OPAQUE 0" somewhere before including curses.h.

This problem is also suggested in Changeset 52086, by jeremyhu.

Change History (4)

comment:1 Changed 15 years ago by every_step_i_destroy@…

P.S.

I confirmed that, under MacOSX10.5.sdk, curses.h doesn't have NCURSES_OPAQUE definition. NCURSES_OPAQUE must be introduced in 10.6, no doubt.

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Keywords: 10.6 ncurses curses removed
Milestone: MacPorts 1.8.1
Priority: HighNormal

/opt/local/include/ncurses/ncurses.h says:

#ifndef NCURSES_OPAQUE
#define NCURSES_OPAQUE 0
#endif

Where is the problem?

comment:3 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:4 Changed 15 years ago by tobypeterson

Resolution: invalid
Status: newclosed

This not a MacPorts issue. File a radar.

Note: See TracTickets for help on using tickets.