Compiling Curses in OS X for Perl

P

Pacman

A note to anyone wanting to get Curses to compile under OS X 10.2.6.
I had to make some changes to the standard c-config.h hints file, the
old 'darwin' one does not work due to conflicts between some perl
definitions and curses.h definitions namely:

instr
bool
FIELD

here's the c-config.h file I altered:

/* Hint file for the darwin platform.
*
* If this configuration doesn't work, look at the file "c-none.h"
* for how to set the configuration options.
*/


#include <curses.h>

#ifdef C_PANELSUPPORT
#include <panel.h>
#endif

#ifdef C_MENUSUPPORT
#include <menu.h>
#endif

/* OK this is hackish, but it solves the problem. */
#ifdef C_FORMSUPPORT
#include "/usr/include/form.h"
#endif

/* FIX: OS X longname only takes 0 args now */
#define C_LONGNAME
#define C_LONG0ARGS
#undef C_LONG2ARGS

/* FIX: OS X touchline is now 3 args */
#define C_TOUCHLINE
#define C_TOUCH3ARGS
#undef C_TOUCH4ARGS

/* These both get defined in curses.h and then redefined later in
Perl.h */
#undef instr
#undef bool

P-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top