Dammit, the NEdit code update before 1.1.0 introduced "bool" back into

Fl_Text_*.  Rather than breaking binary compatibility, add the necessary
configure check and code in config.h.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2682 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-10-22 13:45:23 +00:00
parent 2ba819c6e7
commit 3939b6cde5
3 changed files with 40 additions and 4 deletions

View File

@ -1,5 +1,8 @@
CHANGES IN FLTK 1.1.1
- The Fl_Text_* widgets use the C++ bool type, which is
not supported by older C++ compilers. Added a
configure check and workaround code for this.
- Fl_X::set_xid() didn't initialize the backbuffer_bad
element that was used with XDBE.
- Fl_Shared_Image::uncache() was not implemented.

View File

@ -1,5 +1,5 @@
/*
* "$Id: configh.in,v 1.11.2.11.2.13 2002/08/05 17:50:21 easysw Exp $"
* "$Id: configh.in,v 1.11.2.11.2.14 2002/10/22 13:45:23 easysw Exp $"
*
* Configuration file for the Fast Light Tool Kit (FLTK).
* @configure_input@
@ -31,6 +31,22 @@
#define FLTK_DATADIR ""
#define FLTK_DOCDIR ""
/*
* Old C++ compilers don't support the bool type; unfortunately, it crept
* into FLTK 1.1.0 (Fl_Text_*) when we updated to the latest NEdit code,
* but we didn't notice it before 1.1.0 went out the door. Rather than
* break binary compatibility or do a 1.2.0 release for the sake of the
* few old C++ compilers that can't handle it, the following definitions
* allow older compilers to compile code using the bool type...
*/
#undef HAVE_BOOL
#if !defined(HAVE_BOOL) && defined(__cplusplus)
typedef char bool;
enum { false, true };
#endif /* !HAVE_BOOL */
/*
* BORDER_WIDTH:
*
@ -220,5 +236,5 @@
/*
* End of "$Id: configh.in,v 1.11.2.11.2.13 2002/08/05 17:50:21 easysw Exp $".
* End of "$Id: configh.in,v 1.11.2.11.2.14 2002/10/22 13:45:23 easysw Exp $".
*/

View File

@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
dnl "$Id: configure.in,v 1.33.2.31.2.88 2002/10/07 13:19:21 easysw Exp $"
dnl "$Id: configure.in,v 1.33.2.31.2.89 2002/10/22 13:45:23 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@ -278,6 +278,23 @@ else
fi
fi
dnl Does the C++ compiler support the bool type?
AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
ac_cv_cxx_bool,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
int f(int x){return 1;}
int f(char x){return 1;}
int f(bool x){return 1;}
],[bool b = true; return f(b);],
ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no)
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_bool" = yes; then
AC_DEFINE(HAVE_BOOL)
fi
dnl Standard headers and functions...
AC_HEADER_DIRENT
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H))
@ -785,5 +802,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config
dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.88 2002/10/07 13:19:21 easysw Exp $".
dnl End of "$Id: configure.in,v 1.33.2.31.2.89 2002/10/22 13:45:23 easysw Exp $".
dnl