]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Assume <stdbool.h> exists
authorAlejandro Colomar <alx@kernel.org>
Fri, 2 Dec 2022 15:51:05 +0000 (16:51 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Mon, 12 Dec 2022 08:16:43 +0000 (09:16 +0100)
ISO C99 requires <stdbool.h>.

Many files in the project already include <stdbool.h> unconditionally,
so it's reasonable to assume that it is always available.

Link: <https://github.com/shadow-maint/shadow/pull/600>
Cc: Christian Göttsche <cgzones@googlemail.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/defines.h

index a22b47bdd07c41e560ef44c93eed538d8a0609f0..c39da0f096926f46713c2e888bc311f6d515bb64 100644 (file)
@@ -36,8 +36,6 @@ LT_INIT
 dnl Checks for libraries.
 
 dnl Checks for header files.
-AC_HEADER_STDBOOL
-
 AC_CHECK_HEADERS(crypt.h errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
        utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
        utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \
index 7950cdfaa1471ac651a5e121036daad302ef8dfc..a47f257193d4b0b8b64bb9ef70e06dde5c55ddae 100644 (file)
@@ -6,21 +6,7 @@
 
 #include "config.h"
 
-#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
+#include <stdbool.h>
 
 /* Take care of NLS matters.  */
 #ifdef S_SPLINT_S