[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation failure on ncurses/tinfo/lib_acs.c
From: |
Thomas Dickey |
Subject: |
Re: compilation failure on ncurses/tinfo/lib_acs.c |
Date: |
Thu, 20 Dec 2001 18:58:40 -0500 |
User-agent: |
Mutt/1.2.5i |
On Fri, Dec 21, 2001 at 12:08:12AM +0100, Robert Joop wrote:
> [ncurses 5.2 patched till 20011218]
>
> ncurses/tinfo/lib_acs.c fails to compile:
>
> ../ncurses/./tinfo/lib_acs.c: In function `_nc_init_acs':
> ../ncurses/./tinfo/lib_acs.c:157: sizeof applied to an incomplete type
> ../ncurses/./tinfo/lib_acs.c:158: sizeof applied to an incomplete type
>
> i've tracked the problem down to include/term.h (included by lib_acs.c) and
> its
>
> #undef BROKEN_LINKER
> #define BROKEN_LINKER 1
>
> then the only mentioning of acs_map boils down to
>
> extern chtype acs_map[];
>
> on which of course SIZEOF() doesn't work.
>
> does it compile for anybody else?
If BROKEN_LINKER is defined, the related definitions should be (is, when
I compile it):
in include/curses.h:
#if 1
extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void);
#define acs_map (_nc_acs_map())
#else
extern NCURSES_EXPORT_VAR(chtype) acs_map[];
#endif
in ncurses/tinfo/lib_acs.c
#if BROKEN_LINKER
NCURSES_EXPORT_VAR(chtype *)
_nc_acs_map(void)
{
static chtype *the_map = 0;
if (the_map == 0)
the_map = typeCalloc(chtype, ACS_LEN);
return the_map;
}
}
#else
Looking further, I see that SIZEOF is used in the TRACE ifdef. gcc accepts
that (though it looks like it's wrong). I should replace the SIZEOF by
ACS_LEN - thanks.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net