Update integer limits code.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29661 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-02-18 07:06:42 +00:00
parent c45deb3cf8
commit bbcf9bd03e
7 changed files with 35 additions and 240 deletions

133
configure vendored
View file

@ -16242,139 +16242,6 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking whether precompiler handles LONG_LONG_MAX" >&5
echo $ECHO_N "checking whether precompiler handles LONG_LONG_MAX... $ECHO_C" >&6
# We need to define _GNU_SOURCE for some systems to enable LONG_LONG_MAX
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <limits.h>
#if defined(LONG_LONG_MAX)
#if LONG_MAX == LONG_LONG_MAX
#error long max equals long long max
#endif
#else
#error long long max not defined
#endif
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
llmax=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
llmax=no
fi
rm -f conftest.err conftest.$ac_ext
if test $llmax = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
#define HANDLE_LONG_LONG_MAX 1
_ACEOF
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
#
# Solaris and *BSD use LLONG_MAX instead
#
echo "$as_me:$LINENO: checking whether we have LLONG_MAX" >&5
echo $ECHO_N "checking whether we have LLONG_MAX... $ECHO_C" >&6
# We need to use the same header environment as the test above because we
# will be using one or the other set of constants.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <limits.h>
#if defined(LLONG_MAX)
#if LONG_MAX == LLONG_MAX
#error long max equals long long max
#endif
#else
#error llong max not defined
#endif
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
llmax=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
llmax=no
fi
rm -f conftest.err conftest.$ac_ext
if test $llmax = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
#define HANDLE_LLONG_MAX 1
_ACEOF
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
for ac_header in wchar.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`