mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
restore old fake boolean typedef when no <stdbool.h>
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -45,9 +45,6 @@ The following are the changes from calc version 2.14.3.5 to date:
|
||||
Fixed have_statfs optional executable file extension ${EXT{ in
|
||||
the ${UTIL_PROGS} make variable.
|
||||
|
||||
Prevented the "fake boolean value" when <stdbool.h> is missing,
|
||||
from complicating C compilers post c17 standard.
|
||||
|
||||
Test if <stdint.h> exists and set HAVE_STDINT_H accordingly
|
||||
in have_stdint.h. Added HAVE_STDINT_H to allow one to force
|
||||
this value.
|
||||
|
4
bool.h
4
bool.h
@@ -42,9 +42,7 @@
|
||||
#if !defined(HAVE_STDBOOL_H)
|
||||
|
||||
/* fake a <stdbool.h> header file */
|
||||
#if __STDC_VERSION__ <= 201710
|
||||
typedef unsigned int bool; /* fake boolean typedef */
|
||||
#endif /* __STDC_VERSION__ <= 201710 */
|
||||
typedef unsigned char bool; /* fake boolean typedef */
|
||||
#undef true
|
||||
#define true ((bool)(1))
|
||||
#undef false
|
||||
|
Reference in New Issue
Block a user