[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] stdbool.h
From: |
Bruno Haible |
Subject: |
[Bug-gnulib] stdbool.h |
Date: |
Thu, 9 Jan 2003 14:40:09 +0100 (CET) |
Hi,
I made the following changes to the module stdbool: A substitute file
lib/stdbool.h is created at configure time if configure detects that
the platform does not have a correct <stdbool.h>. This makes it
possible to use <stdbool.h> without any #ifs. It is now as simple to
use 'bool' from <stdbool.h> as using 'size_t' from <stdlib.h>.
2003-01-09 Bruno Haible <address@hidden>
* modules/stdbool: Change configure.ac, Makefile.am requirements.
Simplify Include requirements.
* m4/stdbool.m4 (AM_STDBOOL_H): New macro.
* lib/stdbool.h.in: New file.
*** modules/stdbool 31 Dec 2002 13:46:31 -0000 1.1
--- modules/stdbool 9 Jan 2003 13:35:14 -0000 1.2
***************
*** 8,29 ****
configure.ac:
! AC_HEADER_STDBOOL
Makefile.am:
Include:
! #if HAVE_STDBOOL_H
! # include <stdbool.h>
! #else
! # if ! HAVE__BOOL
! # ifdef __cplusplus
! typedef bool _Bool;
! # else
! typedef enum {false = 0, true = 1} _Bool;
! # endif
! # endif
! # define bool _Bool
! # define false 0
! # define true 1
! # define __bool_true_false_are_defined 1
! #endif
--- 8,23 ----
configure.ac:
! AM_STDBOOL_H
Makefile.am:
+ EXTRA_DIST += stdbool.h.in
+
+ # The following is needed in order to create an <stdbool.h> when the system
+ # doesn't have one that works.
+ all-local: @STDBOOL_H@
+ stdbool.h: stdbool.h.in
+ sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' < $(srcdir)/stdbool.h.in >
stdbool.h
+ MOSTLYCLEANFILES += stdbool.h
Include:
! #include <stdbool.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnulib] stdbool.h,
Bruno Haible <=