summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure33
-rw-r--r--Cross/config.sh-arm-linux1
-rw-r--r--Cross/config.sh-arm-linux-n7701
-rw-r--r--NetWare/config.wc1
-rw-r--r--Porting/config.sh1
-rwxr-xr-xconfig_h.SH7
-rw-r--r--configure.com2
-rw-r--r--metaconfig.h3
-rw-r--r--plan9/config_sh.sample1
-rw-r--r--uconfig.h11
-rw-r--r--uconfig.sh1
-rw-r--r--uconfig64.sh1
-rw-r--r--win32/config.gc1
-rw-r--r--win32/config.vc1
14 files changed, 61 insertions, 4 deletions
diff --git a/Configure b/Configure
index 46f68258a7..3bcd107065 100755
--- a/Configure
+++ b/Configure
@@ -394,6 +394,7 @@ d_attribute_unused=''
d_attribute_warn_unused_result=''
d_printf_format_null=''
d_backtrace=''
+d_non_int_bitfields=''
d_builtin_choose_expr=''
d_builtin_expect=''
d_builtin_add_overflow=''
@@ -16541,6 +16542,37 @@ eval $inhdr
set nl_langinfo d_nl_langinfo
eval $inlibc
+: Look for non 'int'-sized bitfields
+case "$d_non_int_bitfields" in
+'')
+echo " " >&4
+echo "Checking whether your compiler can handle struct bitfields that aren't 'int' or 'unsigned int' ..." >&4
+$cat >try.c <<'EOCP'
+#include <stdio.h>
+struct foo {
+ unsigned char byte:1;
+ unsigned short halfword:1;
+} bar;
+EOCP
+if $cc $ccflags -c try.c >try.out 2>&1 ; then
+ if $compiler_warning try.out >/dev/null 2>&1; then
+ echo "Your C compiler doesn't support struct bitfields that aren't 'int' or 'unsigned int'." >&4
+ val="$undef"
+ else
+ echo "Your C compiler supports struct bitfields besides 'int' and 'unsigned int'." >&4
+ val="$define"
+ fi
+else
+ echo "Your C compiler doesn't seem to understand struct bitfields that aren't 'int' or 'unsigned int' at all." >&4
+ val="$undef"
+fi
+;;
+*) val="$d_non_int_bitfields" ;;
+esac
+set d_non_int_bitfields
+eval $setvar
+$rm_try
+
: see if this is a quadmath.h system
set quadmath.h i_quadmath
eval $inhdr
@@ -24527,6 +24559,7 @@ d_nextafter='$d_nextafter'
d_nexttoward='$d_nexttoward'
d_nice='$d_nice'
d_nl_langinfo='$d_nl_langinfo'
+d_non_int_bitfields='$d_non_int_bitfields'
d_nv_preserves_uv='$d_nv_preserves_uv'
d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero'
d_off64_t='$d_off64_t'
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux
index 2c6db13a12..18caa12d38 100644
--- a/Cross/config.sh-arm-linux
+++ b/Cross/config.sh-arm-linux
@@ -418,6 +418,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='define'
d_nl_langinfo='define'
+d_non_int_bitfields='define'
d_nv_preserves_uv='define'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='undef'
diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770
index 020843665e..a1dcf24714 100644
--- a/Cross/config.sh-arm-linux-n770
+++ b/Cross/config.sh-arm-linux-n770
@@ -417,6 +417,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='define'
d_nl_langinfo='define'
+d_non_int_bitfields='define'
d_nv_preserves_uv='define'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='undef'
diff --git a/NetWare/config.wc b/NetWare/config.wc
index 26c1755798..ef9fb5ee00 100644
--- a/NetWare/config.wc
+++ b/NetWare/config.wc
@@ -407,6 +407,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='undef'
d_nl_langinfo='undef'
+d_non_int_bitfields='define'
d_nv_preserves_uv='define'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='undef'
diff --git a/Porting/config.sh b/Porting/config.sh
index 391415d5e6..5fc8ccce18 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -436,6 +436,7 @@ d_nextafter='define'
d_nexttoward='define'
d_nice='define'
d_nl_langinfo='define'
+d_non_int_bitfields='define'
d_nv_preserves_uv='define'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='define'
diff --git a/config_h.SH b/config_h.SH
index 8264f91dce..69103e4195 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -2339,6 +2339,13 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_atanh HAS_ATANH /**/
+/* HAS_NON_INT_BITFIELDS:
+ * This symbol, if defined, indicates that the C compiler accepts, without
+ * error or warning, struct bitfields that are declared with sizes other
+ * than plain 'int'; for example 'unsigned char' is accepted.
+ */
+#$d_non_int_bitfields HAS_NON_INT_BITFIELDS /**/
+
/* HAS_BUILTIN_CHOOSE_EXPR:
* Can we handle GCC builtin for compile-time ternary-like expressions
*/
diff --git a/configure.com b/configure.com
index df2958201e..2dbb4fba78 100644
--- a/configure.com
+++ b/configure.com
@@ -5610,6 +5610,7 @@ $ d_mbstowcs="define"
$ d_mbtowc="define"
$ d_mktime="define"
$ d_nl_langinfo="define"
+$ d_non_int_bitfields="define"
$ d_setlocale="define"
$ d_setlocale_accepts_any_locale_name="undef"
$ d_stdiobase="define"
@@ -6399,6 +6400,7 @@ $ WC "d_nextafter='" + d_nextafter + "'"
$ WC "d_nexttoward='" + d_nexttoward + "'"
$ WC "d_nice='define'"
$ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
+$ WC "d_non_int_bitfields='define'"
$ WC "d_getenv_preserves_other_thread='" + d_getenv_preserves_other_thread + "'"
$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
$ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'"
diff --git a/metaconfig.h b/metaconfig.h
index ae0093afd4..c2a4650d12 100644
--- a/metaconfig.h
+++ b/metaconfig.h
@@ -13,7 +13,6 @@
* Symbols should only be here temporarily. Once they are actually used,
* they should be removed from here.
*
- * HAS_WCRTOMB
- * GETENV_PRESERVES_OTHER_THREAD
+ * HAS_NON_INT_BITFIELDS
*
*/
diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample
index 63073397e1..2b8e88e80a 100644
--- a/plan9/config_sh.sample
+++ b/plan9/config_sh.sample
@@ -418,6 +418,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='undef'
d_nl_langinfo='undef'
+d_non_int_bitfields='define'
d_nv_preserves_uv='undef'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='undef'
diff --git a/uconfig.h b/uconfig.h
index 94bd2a1e04..27d88d39db 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -2304,6 +2304,13 @@
*/
/*#define HAS_ATANH / **/
+/* HAS_NON_INT_BITFIELDS:
+ * This symbol, if defined, indicates that the C compiler accepts, without
+ * error or warning, struct bitfields that are declared with sizes other
+ * than plain 'int'; for example 'unsigned char' is accepted.
+ */
+#define HAS_NON_INT_BITFIELDS /**/
+
/* HAS_BUILTIN_CHOOSE_EXPR:
* Can we handle GCC builtin for compile-time ternary-like expressions
*/
@@ -5282,6 +5289,6 @@
#endif
/* Generated from:
- * 6edd641b187b02d0daa8cb53f5d22f2dcca115a0d3e744f51b0292d2db484ca5 config_h.SH
- * a0fa823df68d3b6a854579e3727e8d354614ad995d17f68b691399261825c2d3 uconfig.sh
+ * dac70e6e1bbb594cb13128b2271cfd83bc32d4cb1d14179edc6100597299d0bf config_h.SH
+ * bad73e58d466bfe6befab92731c4d075d5d439b45fd11c20585b3514865093a8 uconfig.sh
* ex: set ro: */
diff --git a/uconfig.sh b/uconfig.sh
index b38db79b74..7888ca4b4b 100644
--- a/uconfig.sh
+++ b/uconfig.sh
@@ -358,6 +358,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='undef'
d_nl_langinfo='undef'
+d_non_int_bitfields='define'
d_nv_preserves_uv='undef'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='undef'
diff --git a/uconfig64.sh b/uconfig64.sh
index a0e3a5bfa7..c4649e2d10 100644
--- a/uconfig64.sh
+++ b/uconfig64.sh
@@ -358,6 +358,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='undef'
d_nl_langinfo='undef'
+d_non_int_bitfields='define'
d_nv_preserves_uv='undef'
d_nv_zero_is_allbits_zero='undef'
d_off64_t='undef'
diff --git a/win32/config.gc b/win32/config.gc
index af6fed92fb..5ea0e48faa 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -407,6 +407,7 @@ d_nextafter='define'
d_nexttoward='define'
d_nice='undef'
d_nl_langinfo='undef'
+d_non_int_bitfields='define'
d_nv_preserves_uv='define'
d_nv_zero_is_allbits_zero='define'
d_off64_t='undef'
diff --git a/win32/config.vc b/win32/config.vc
index f4625bf2a4..e76ba4365a 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -407,6 +407,7 @@ d_nextafter='undef'
d_nexttoward='undef'
d_nice='undef'
d_nl_langinfo='undef'
+d_non_int_bitfields='define'
d_nv_preserves_uv='define'
d_nv_zero_is_allbits_zero='define'
d_off64_t='undef'