1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Check for the C99 bool type and define it if missing.

This commit is contained in:
hniksic 2005-06-22 10:51:29 -07:00
parent b8c20f01bc
commit 19a1ffb2e9
4 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* configure.in: Check for C99 conformant stdbool.h.
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org> 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* MAILING-LIST: Remove reference to the obsolete `wget-cvs' * MAILING-LIST: Remove reference to the obsolete `wget-cvs'

View File

@ -162,6 +162,7 @@ dnl Check for basic headers, even those we assume the presence of.
dnl This is because Autoconf default includes check for STDC_HEADERS, dnl This is because Autoconf default includes check for STDC_HEADERS,
dnl HAVE_SYS_TYPES_H, etc. before including them. dnl HAVE_SYS_TYPES_H, etc. before including them.
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS(sys/types.h sys/stat.h) AC_CHECK_HEADERS(sys/types.h sys/stat.h)
dnl Now check for the others. dnl Now check for the others.
AC_CHECK_HEADERS(string.h strings.h limits.h unistd.h sys/time.h) AC_CHECK_HEADERS(string.h strings.h limits.h unistd.h sys/time.h)

View File

@ -1,3 +1,7 @@
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* sysdep.h: Include the stdbool.h/_Bool/bool blurb from Autoconf.
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org> 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* init.c (cmd_lockable_boolean): Removed. * init.c (cmd_lockable_boolean): Removed.

View File

@ -63,6 +63,24 @@ so, delete this exception statement from your version. */
# include <io.h> # include <io.h>
#endif /* __WATCOMC__ */ #endif /* __WATCOMC__ */
/* Provide support for C99-type boolean type "bool". This blurb comes
straight from the Autoconf 2.59 manual. */
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
# if ! HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
# else
typedef unsigned char _Bool;
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif
/* Needed for compilation under OS/2: */ /* Needed for compilation under OS/2: */
#ifdef __EMX__ #ifdef __EMX__
# ifndef S_ISLNK # ifndef S_ISLNK