Skip to content

Commit b611cc9

Browse files
author
jan.nijtmans
committed
Always include stdbool.h, not only on Windows. We assume C99 already.
1 parent c1b434e commit b611cc9

File tree

6 files changed

+1
-131
lines changed

6 files changed

+1
-131
lines changed

generic/tclInt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#include <stdarg.h>
6969
#include <stdlib.h>
7070
#include <stdint.h>
71+
#include <stdbool.h>
7172
#include <string.h>
7273
#include <locale.h>
7374

@@ -149,7 +150,6 @@
149150
#elif defined(__GNUC__)
150151
#define TCL_UNREACHABLE() __builtin_unreachable()
151152
#elif defined(_MSC_VER)
152-
#include <stdbool.h>
153153
#define TCL_UNREACHABLE() __assume(false)
154154
#else
155155
#define TCL_UNREACHABLE() ((void) 0)

unix/configure

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7540,15 +7540,6 @@ printf "%s\n" "$tcl_cv_cc_input_charset" >&6; }
75407540
CFLAGS="$CFLAGS -finput-charset=UTF-8"
75417541
fi
75427542

7543-
ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
7544-
if test "x$ac_cv_header_stdbool_h" = xyes
7545-
then :
7546-
7547-
printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
7548-
7549-
fi
7550-
7551-
75527543
# Check for vfork, posix_spawnp() and friends unconditionally
75537544
ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
75547545
if test "x$ac_cv_func_vfork" = xyes

unix/tcl.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,8 +1862,6 @@ dnl # preprocessing tests use only CPPFLAGS.
18621862
CFLAGS="$CFLAGS -finput-charset=UTF-8"
18631863
fi
18641864
1865-
AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)
1866-
18671865
# Check for vfork, posix_spawnp() and friends unconditionally
18681866
AC_CHECK_FUNCS(vfork posix_spawnp posix_spawn_file_actions_adddup2 posix_spawnattr_setflags)
18691867

unix/tclConfig.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@
196196
/* Are characters signed? */
197197
#undef HAVE_SIGNED_CHAR
198198

199-
/* Do we have <stdbool.h>? */
200-
#undef HAVE_STDBOOL_H
201-
202199
/* Define to 1 if you have the <stdint.h> header file. */
203200
#undef HAVE_STDINT_H
204201

win/configure

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -607,38 +607,6 @@ PACKAGE_BUGREPORT=''
607607
PACKAGE_URL=''
608608

609609
ac_unique_file="../generic/tcl.h"
610-
# Factoring default headers for most tests.
611-
ac_includes_default="\
612-
#include <stddef.h>
613-
#ifdef HAVE_STDIO_H
614-
# include <stdio.h>
615-
#endif
616-
#ifdef HAVE_STDLIB_H
617-
# include <stdlib.h>
618-
#endif
619-
#ifdef HAVE_STRING_H
620-
# include <string.h>
621-
#endif
622-
#ifdef HAVE_INTTYPES_H
623-
# include <inttypes.h>
624-
#endif
625-
#ifdef HAVE_STDINT_H
626-
# include <stdint.h>
627-
#endif
628-
#ifdef HAVE_STRINGS_H
629-
# include <strings.h>
630-
#endif
631-
#ifdef HAVE_SYS_TYPES_H
632-
# include <sys/types.h>
633-
#endif
634-
#ifdef HAVE_SYS_STAT_H
635-
# include <sys/stat.h>
636-
#endif
637-
#ifdef HAVE_UNISTD_H
638-
# include <unistd.h>
639-
#endif"
640-
641-
ac_header_c_list=
642610
ac_subst_vars='LTLIBOBJS
643611
LIBOBJS
644612
RES
@@ -1570,41 +1538,6 @@ fi
15701538

15711539
} # ac_fn_c_try_compile
15721540

1573-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1574-
# -------------------------------------------------------
1575-
# Tests whether HEADER exists and can be compiled using the include files in
1576-
# INCLUDES, setting the cache variable VAR accordingly.
1577-
ac_fn_c_check_header_compile ()
1578-
{
1579-
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1581-
printf %s "checking for $2... " >&6; }
1582-
if eval test \${$3+y}
1583-
then :
1584-
printf %s "(cached) " >&6
1585-
else case e in #(
1586-
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1587-
/* end confdefs.h. */
1588-
$4
1589-
#include <$2>
1590-
_ACEOF
1591-
if ac_fn_c_try_compile "$LINENO"
1592-
then :
1593-
eval "$3=yes"
1594-
else case e in #(
1595-
e) eval "$3=no" ;;
1596-
esac
1597-
fi
1598-
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1599-
esac
1600-
fi
1601-
eval ac_res=\$$3
1602-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1603-
printf "%s\n" "$ac_res" >&6; }
1604-
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1605-
1606-
} # ac_fn_c_check_header_compile
1607-
16081541
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
16091542
# -------------------------------------------
16101543
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -2322,15 +2255,6 @@ main (int argc, char **argv)
23222255
}
23232256
"
23242257

2325-
as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2326-
as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2327-
as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2328-
as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2329-
as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2330-
as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2331-
as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2332-
as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2333-
as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
23342258
# Check that the precious variables saved in the cache have kept the same
23352259
# value.
23362260
ac_cache_corrupted=false
@@ -3944,35 +3868,6 @@ printf "%s\n" "#define STATIC_BUILD 1" >>confdefs.h
39443868
# after SC_ENABLE_SHARED checks the configure switches.
39453869
#--------------------------------------------------------------------
39463870

3947-
ac_header= ac_cache=
3948-
for ac_item in $ac_header_c_list
3949-
do
3950-
if test $ac_cache; then
3951-
ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
3952-
if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
3953-
printf "%s\n" "#define $ac_item 1" >> confdefs.h
3954-
fi
3955-
ac_header= ac_cache=
3956-
elif test $ac_header; then
3957-
ac_cache=$ac_item
3958-
else
3959-
ac_header=$ac_item
3960-
fi
3961-
done
3962-
3963-
3964-
3965-
3966-
3967-
3968-
3969-
3970-
if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
3971-
then :
3972-
3973-
printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
3974-
3975-
fi
39763871

39773872

39783873
# Step 0: Enable 64 bit support?
@@ -4887,15 +4782,6 @@ printf "%s\n" "#define EXCEPTION_DISPOSITION int" >>confdefs.h
48874782

48884783
fi
48894784

4890-
ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
4891-
if test "x$ac_cv_header_stdbool_h" = xyes
4892-
then :
4893-
4894-
printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
4895-
4896-
fi
4897-
4898-
48994785
# See if the compiler supports casting to a union type.
49004786
# This is used to stop gcc from printing a compiler
49014787
# warning when initializing a union member.

win/tcl.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
946946
[Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
947947
fi
948948
949-
AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)
950-
951949
# See if the compiler supports casting to a union type.
952950
# This is used to stop gcc from printing a compiler
953951
# warning when initializing a union member.

0 commit comments

Comments
 (0)