mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 04:10:29 +08:00
configure.in (LIMITS_INC_SRCDIR): New variable.
* configure.in (LIMITS_INC_SRCDIR): New variable. * configure.target (LIMITSH): New variable. * porting.texi: Discuss numeric limits. * config/cpu/generic/bits/limits.h: New file. * config/cpu/i386/bits/limits.h: New file. * include/Makefile.am: Install bits/limits.h. * include/bits/c++config: Include bits/limits.h. From-SVN: r44877
This commit is contained in:
parent
f22db2ef6d
commit
9f3c078ea9
@ -1,3 +1,13 @@
|
||||
2001-08-13 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* configure.in (LIMITS_INC_SRCDIR): New variable.
|
||||
* configure.target (LIMITSH): New variable.
|
||||
* porting.texi: Discuss numeric limits.
|
||||
* config/cpu/generic/bits/limits.h: New file.
|
||||
* config/cpu/i386/bits/limits.h: New file.
|
||||
* include/Makefile.am: Install bits/limits.h.
|
||||
* include/bits/c++config: Include bits/limits.h.
|
||||
|
||||
2001-08-13 H.J. Lu (hjl@gnu.org)
|
||||
|
||||
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-copy-files):
|
||||
|
@ -105,6 +105,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
40
libstdc++-v3/config/cpu/generic/bits/limits.h
Normal file
40
libstdc++-v3/config/cpu/generic/bits/limits.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
// Nothing is defined in the generic file. In that way, we fall back
|
||||
// on the defaults in std_limits.h.
|
||||
|
||||
// If you need to override these defaults, you can either use a
|
||||
// CPU-specific version (in which case you must modify
|
||||
// configure.target) or you must add the overrides to your
|
||||
// os_defines.h. In general, if all systems for your CPU use the
|
||||
// same values, it is best to use a cpu-specific configuration file.
|
||||
|
||||
#endif
|
33
libstdc++-v3/config/cpu/i386/bits/limits.h
Normal file
33
libstdc++-v3/config/cpu/i386/bits/limits.h
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _GLIBCPP_CPU_LIMITS
|
||||
#define _GLIBCPP_CPU_LIMITS 1
|
||||
|
||||
#define __glibcpp_long_double_bits 80
|
||||
|
||||
#endif
|
11
libstdc++-v3/configure
vendored
11
libstdc++-v3/configure
vendored
@ -19156,6 +19156,8 @@ fi
|
||||
# Propagate the target-specific source directories through the build chain.
|
||||
OS_INC_SRCDIR=$os_include_dir/bits
|
||||
ATOMICITY_INC_SRCDIR=$ATOMICITYH/bits
|
||||
LIMITS_INC_SRCDIR=$LIMITSH/bits
|
||||
|
||||
|
||||
|
||||
|
||||
@ -19237,13 +19239,13 @@ glibcpp_toolexeclibdir=no
|
||||
glibcpp_prefixdir=${prefix}
|
||||
|
||||
echo $ac_n "checking for interface version number""... $ac_c" 1>&6
|
||||
echo "configure:19241: checking for interface version number" >&5
|
||||
echo "configure:19243: checking for interface version number" >&5
|
||||
libstdcxx_interface=$INTERFACE
|
||||
echo "$ac_t""$libstdcxx_interface" 1>&6
|
||||
|
||||
# Process the option --with-gxx-include-dir=<path to include-files directory>
|
||||
echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6
|
||||
echo "configure:19247: checking for --with-gxx-include-dir" >&5
|
||||
echo "configure:19249: checking for --with-gxx-include-dir" >&5
|
||||
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
|
||||
if test "${with_gxx_include_dir+set}" = set; then
|
||||
withval="$with_gxx_include_dir"
|
||||
@ -19267,7 +19269,7 @@ echo "$ac_t""$gxx_include_dir" 1>&6
|
||||
|
||||
# Process the option "--enable-version-specific-runtime-libs"
|
||||
echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
|
||||
echo "configure:19271: checking for --enable-version-specific-runtime-libs" >&5
|
||||
echo "configure:19273: checking for --enable-version-specific-runtime-libs" >&5
|
||||
# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
|
||||
if test "${enable_version_specific_runtime_libs+set}" = set; then
|
||||
enableval="$enable_version_specific_runtime_libs"
|
||||
@ -19308,7 +19310,7 @@ if test x"$glibcpp_toolexecdir" = x"no"; then
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for install location""... $ac_c" 1>&6
|
||||
echo "configure:19312: checking for install location" >&5
|
||||
echo "configure:19314: checking for install location" >&5
|
||||
echo "$ac_t""$gxx_include_dir" 1>&6
|
||||
|
||||
|
||||
@ -19603,6 +19605,7 @@ s%@USE_COMPLEX_LONG_DOUBLE@%$USE_COMPLEX_LONG_DOUBLE%g
|
||||
s%@WERROR@%$WERROR%g
|
||||
s%@OS_INC_SRCDIR@%$OS_INC_SRCDIR%g
|
||||
s%@ATOMICITY_INC_SRCDIR@%$ATOMICITY_INC_SRCDIR%g
|
||||
s%@LIMITS_INC_SRCDIR@%$LIMITS_INC_SRCDIR%g
|
||||
s%@GLIBCPP_IS_CROSS_COMPILING@%$GLIBCPP_IS_CROSS_COMPILING%g
|
||||
s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
|
||||
s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
|
||||
|
@ -204,8 +204,10 @@ fi
|
||||
# Propagate the target-specific source directories through the build chain.
|
||||
OS_INC_SRCDIR=$os_include_dir/bits
|
||||
ATOMICITY_INC_SRCDIR=$ATOMICITYH/bits
|
||||
LIMITS_INC_SRCDIR=$LIMITSH/bits
|
||||
AC_SUBST(OS_INC_SRCDIR)
|
||||
AC_SUBST(ATOMICITY_INC_SRCDIR)
|
||||
AC_SUBST(LIMITS_INC_SRCDIR)
|
||||
|
||||
# Set up cross-compile flags
|
||||
AC_SUBST(GLIBCPP_IS_CROSS_COMPILING)
|
||||
|
@ -122,3 +122,16 @@ case "${target}" in
|
||||
ATOMICITYH=$cpu_include_dir
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set LIMITSH to the directory where the configuration-dependent
|
||||
# limits.h can be found.
|
||||
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
||||
|
||||
case "${target}" in
|
||||
i?86-*-*)
|
||||
LIMITSH=config/cpu/i386
|
||||
;;
|
||||
*)
|
||||
LIMITSH=config/cpu/generic
|
||||
;;
|
||||
esac
|
||||
|
@ -21,7 +21,7 @@
|
||||
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
## USA.
|
||||
|
||||
## $Id: Makefile.am,v 1.3 2001/08/10 15:47:21 gdr Exp $
|
||||
## $Id: Makefile.am,v 1.4 2001/08/10 20:44:53 ljrittle Exp $
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.3 gnits
|
||||
MAINT_CHARSET = latin1
|
||||
@ -285,7 +285,8 @@ target_headers = \
|
||||
${target_srcdir}/ctype_inline.h \
|
||||
${target_srcdir}/ctype_noninline.h \
|
||||
${target_srcdir}/os_defines.h \
|
||||
${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h
|
||||
${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
|
||||
${glibcpp_srcdir}/@LIMITS_INC_SRCDIR@/limits.h
|
||||
|
||||
thread_builddir = ./${target_alias}/bits
|
||||
thread_headers = \
|
||||
|
@ -104,6 +104,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
@ -180,7 +181,7 @@ std_headers = ${std_srcdir}/algorithm ${std_srcdir}/bitset ${std_srcdir}/com
|
||||
|
||||
target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
|
||||
target_builddir = ./${target_alias}/bits
|
||||
target_headers = ${target_srcdir}/ctype_base.h ${target_srcdir}/ctype_inline.h ${target_srcdir}/ctype_noninline.h ${target_srcdir}/os_defines.h ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h
|
||||
target_headers = ${target_srcdir}/ctype_base.h ${target_srcdir}/ctype_inline.h ${target_srcdir}/ctype_noninline.h ${target_srcdir}/os_defines.h ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h ${glibcpp_srcdir}/@LIMITS_INC_SRCDIR@/limits.h
|
||||
|
||||
|
||||
thread_builddir = ./${target_alias}/bits
|
||||
|
@ -32,6 +32,8 @@
|
||||
|
||||
// Pick up any OS-specific definitions.
|
||||
#include <bits/os_defines.h>
|
||||
// And any CPU-specific definitions.
|
||||
#include <bits/limits.h>
|
||||
|
||||
// The current version of the C++ library in compressed ISO date format.
|
||||
#define __GLIBCPP__ 20010813
|
||||
|
@ -105,6 +105,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
@ -103,6 +103,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
@ -105,6 +105,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
@ -102,6 +102,7 @@ LIBMATHOBJS = @LIBMATHOBJS@
|
||||
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
@ -105,6 +105,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
@ -74,6 +74,7 @@ Here are the primary steps required to port the library:
|
||||
* Operating system:: Configuring for your operating system.
|
||||
* Character types:: Implementing character classification.
|
||||
* Thread safety:: Implementing atomic operations.
|
||||
* Numeric limits:: Implementing numeric limits.
|
||||
* Libtool:: Using libtool.
|
||||
* GNU Free Documentation License:: How you can copy and share this manual.
|
||||
@end menu
|
||||
@ -436,6 +437,31 @@ __atomic_add (_Atomic_word* __mem, int __val)
|
||||
@}
|
||||
@end example
|
||||
|
||||
@c ---------------------------------------------------------------------
|
||||
@c Numeric limits
|
||||
@c ---------------------------------------------------------------------
|
||||
|
||||
@node Numeric limits
|
||||
@chapter Numeric limits
|
||||
|
||||
The C++ library requires information about the fundamental data types,
|
||||
such as the minimum and maximum representable values of each type.
|
||||
You can define each of these values individually, but it is usually
|
||||
easiest just to indicate how many bits are used in each of the data
|
||||
types and let the library do the rest. For information about the
|
||||
macros to define, see the top of @file{include/bits/std_limits.h}.
|
||||
|
||||
If you need to define any macros, you can do so in
|
||||
@file{os_defines.h}. However, if all operating systems for your CPU
|
||||
are likely to use the same values, you can provide a CPU-specific file
|
||||
instead so that you do not have to provide the same definitions for
|
||||
each operating system. To take that approach, create a new file
|
||||
called @file{limits.h} in your CPU configuration directory (e.g.,
|
||||
@file{config/cpu/i386/bits}) and then modify @file{configure.target}
|
||||
so that @code{LIMITSH} is set to the CPU directory (e.g.,
|
||||
@file{config/cpu/i386}). Note that @code{LIMITSH} should not include
|
||||
the @samp{bits} part of the directory name.
|
||||
|
||||
@c ---------------------------------------------------------------------
|
||||
@c Libtool
|
||||
@c ---------------------------------------------------------------------
|
||||
|
@ -99,6 +99,7 @@ INTLOBJS = @INTLOBJS@
|
||||
LIBMATHOBJS = @LIBMATHOBJS@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
@ -105,6 +105,7 @@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
|
||||
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIMITS_INC_SRCDIR = @LIMITS_INC_SRCDIR@
|
||||
LN_S = @LN_S@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
Loading…
x
Reference in New Issue
Block a user