haskell / haskell/c2hs

when biulding ncurses: The symbol `can_change_color' does not fit here.

Open
#300 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
211
Forks
52
PR merge metrics
No merged PRs in 30d

Description

when building ncurses-0.2.16, I get
```
cabal install
...
c2hs: C header contains errors:

/usr/include/curses.h:638: (column 13) [ERROR] >>> Syntax error !
The symbol `can_change_color' does not fit here.
```
now `ncurses` seems unmaintained, but the error might be with `c2hs`?

(note: similar error message in #290)

the offending lines of `curses.h` are
```
636 extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* generated */
637 extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); /* generated */
638 extern NCURSES_EXPORT(bool) can_change_color (void); /* implemented */
639 extern NCURSES_EXPORT(int) cbreak (void); /* implemented */
640 extern NCURSES_EXPORT(int) chgat (int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */
641 extern NCURSES_EXPORT(int) clear (void); /* generated */
```
this gets translated (I did `gcc -E`) to
```
extern int border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype);
extern int box (WINDOW *, chtype, chtype);
extern bool can_change_color (void);
extern int cbreak (void);
extern int chgat (int, attr_t, short, const void *);
extern int clear (void);
```
this is the first occurence of `bool`, perhaps `c2hs` doesn't know this type name?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.