On Sun, Apr 18, 2004, Karl Vogel wrote:
> [...]
> Tru64 has no stdbool.h header. The configure script checks for this, but
> I noticed that there is an openpkg patch to disable this check:
>
> ===========
> $ more ncurses.patch
> Index: include/curses.h.in
> --- include/curses.h.in.orig 2004-02-22 09:36:58.000000000 +0100
> +++ include/curses.h.in 2004-02-22 09:37:14.000000000 +0100
> @@ -61,7 +61,11 @@
> * User-definable tweak to disable the include of <stdbool.h>.
> */
> #ifndef NCURSES_ENABLE_STDBOOL_H
> -#define NCURSES_ENABLE_STDBOOL_H @cf_cv_header_stdbool_h@
> +#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
> +#define NCURSES_ENABLE_STDBOOL_H 1
> +#else
> +#define NCURSES_ENABLE_STDBOOL_H 0
> +#endif
> #endif
>
> /*
> ===========
>
> What was the reason for disabling this configure test? Anyway, this
> compile error can be fixed by adding a !defined(__osf__) after the
> STDC_VERSION check.
> [...]
Hell, how brain-dead is Tru64? They define __STDC_VERSION_ to 199901L
or higher but do not actually conform to the C99 standard! Grrr..
Ok, anyway, I've changed our Ncurses patch according to your suggestion
and also included a paragraph explaining why this patch is necessary:
| NCurses determines the presence of the <stdbool.h> header during its
| own build time but the result is used in a public header <curses.h>.
| It cannot be assumed that the application building against this public
| header <curses.h> also uses the same compiler NCurses was built with.
| Hence the public header <curses.h> has to perform an own in-place check
| for <stdbool.h>. This way NCurses can be build with OpenPKG's GCC 3.x
| while an application could build against the provided <curses.h> with an
| arbitrary C compiler (usually a non-GCC 3.x vendor compiler!).
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Developer Communication List [EMAIL PROTECTED]