mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 18:30:18 +00:00
gcc better don't use a signed type for size_t
This commit is contained in:
parent
51a1d39ce3
commit
8720d06638
@ -1,6 +1,8 @@
|
||||
2012-01-08 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* configure.in: Remove last remnants of RANLIB.
|
||||
No need to check for signed size_t anymore.
|
||||
|
||||
* aclocal.m4: Likewise.
|
||||
|
||||
* wcsmbs/mbrtoc16.c: Implement using towc function.
|
||||
|
24
configure
vendored
24
configure
vendored
@ -5634,30 +5634,6 @@ fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed size_t type" >&5
|
||||
$as_echo_n "checking for signed size_t type... " >&6; }
|
||||
if ${libc_cv_signed_size_t+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
echo '#include <stddef.h>
|
||||
FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
|
||||
if eval "$ac_cpp conftest.c 2>/dev/null" \
|
||||
| grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null; then
|
||||
libc_cv_signed_size_t=no
|
||||
else
|
||||
libc_cv_signed_size_t=yes
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_signed_size_t" >&5
|
||||
$as_echo "$libc_cv_signed_size_t" >&6; }
|
||||
if test $libc_cv_signed_size_t = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#undef __SIZE_TYPE__
|
||||
#define __SIZE_TYPE__ unsigned
|
||||
EOF
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libc-friendly stddef.h" >&5
|
||||
$as_echo_n "checking for libc-friendly stddef.h... " >&6; }
|
||||
if ${libc_cv_friendly_stddef+:} false; then :
|
||||
|
18
configure.in
18
configure.in
@ -1096,24 +1096,6 @@ AC_PATH_PROG(INSTALL_INFO, install-info, no,
|
||||
$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
|
||||
AC_PATH_PROG(BISON, bison, no, $PATH:/usr/local/bin:/usr/bin:/bin)
|
||||
|
||||
AC_CACHE_CHECK(for signed size_t type, libc_cv_signed_size_t, [dnl
|
||||
echo '#include <stddef.h>
|
||||
FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
|
||||
if eval "$ac_cpp conftest.c 2>/dev/null" \
|
||||
| grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null; then
|
||||
libc_cv_signed_size_t=no
|
||||
else
|
||||
libc_cv_signed_size_t=yes
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_signed_size_t = yes; then
|
||||
dnl Do this by hand instead of AC_DEFINE so can add #undef to avoid warnings.
|
||||
cat >> confdefs.h <<\EOF
|
||||
#undef __SIZE_TYPE__
|
||||
#define __SIZE_TYPE__ unsigned
|
||||
EOF
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for libc-friendly stddef.h, libc_cv_friendly_stddef, [dnl
|
||||
AC_TRY_COMPILE(dnl
|
||||
[#define __need_size_t
|
||||
|
Loading…
Reference in New Issue
Block a user