]> gcc.gnu.org Git - gcc.git/commitdiff
configure.in (LIMITS_INC_SRCDIR): New variable.
authorMark Mitchell <mark@codesourcery.com>
Mon, 13 Aug 2001 22:26:11 +0000 (22:26 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 13 Aug 2001 22:26:11 +0000 (22:26 +0000)
* 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

18 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.in
libstdc++-v3/config/cpu/generic/bits/limits.h [new file with mode: 0644]
libstdc++-v3/config/cpu/i386/bits/limits.h [new file with mode: 0644]
libstdc++-v3/configure
libstdc++-v3/configure.in
libstdc++-v3/configure.target
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/c++config
libstdc++-v3/intl/Makefile.in
libstdc++-v3/libio/Makefile.in
libstdc++-v3/libmath/Makefile.in
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/po/Makefile.in
libstdc++-v3/porting.texi
libstdc++-v3/src/Makefile.in
libstdc++-v3/testsuite/Makefile.in

index 437ecf686f2df4017745e738456b000c74243a78..e6b532cbe75698e7cc19f6fd7b4b6bf5bfb4ffe2 100644 (file)
@@ -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):
index 152173de00f6bc36742974cb349820bb21f71a15..4525bd43d71ac1e11f57cc852bb4935e1d40d07f 100644 (file)
@@ -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@
diff --git a/libstdc++-v3/config/cpu/generic/bits/limits.h b/libstdc++-v3/config/cpu/generic/bits/limits.h
new file mode 100644 (file)
index 0000000..8fa5a82
--- /dev/null
@@ -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
diff --git a/libstdc++-v3/config/cpu/i386/bits/limits.h b/libstdc++-v3/config/cpu/i386/bits/limits.h
new file mode 100644 (file)
index 0000000..be304e2
--- /dev/null
@@ -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
index 0d5aa0632675ada3a9ab08f6729c22451b1a1d06..d3196168b1b5ba62b0496adc1f73e97c0ea95e52 100755 (executable)
@@ -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
index 8a2b5364d1fd4cbe59742cc0e577a0ad3d915f1e..99d013ab8a26f483880e9e2d1e5c96d7d1312625 100644 (file)
@@ -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)
index 5e619d039f5ddfce84685e880328d7fa7219644b..4cacb4f26d1dccd3d5f2e3a31253a0d4f962bd5b 100644 (file)
@@ -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
index f5ceb08190e656c51ec41381b5df3065c0574852..baf3b0a61c3bcb6f9e207c5f59b5a14607fe3ad0 100644 (file)
@@ -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 = \
index b010d072199e45ea2625a092a6765865e95dd691..3a374cf5fa47abc6bc53febd4ba9e5b9fe9c9646 100644 (file)
@@ -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
index 3fa61fe663773466f14b34c12d564501b3876a5b..42ce59705aadaac6e29b7a8eaf96b5c2d0baad8e 100644 (file)
@@ -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
index fcdf38b72bfb6a6e70be98a293c945d8dc0599c2..1724a3d033a402c3b7110f1b3b65d10a46f1d5ce 100644 (file)
@@ -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@
index 2f1f6ac68a0c5fcabafeb64c7fb121cf208b011d..4965a7b31acc4a8b7f32fdc39d77927de5310df7 100644 (file)
@@ -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@
index e360eb8b3b67c6f3d388a5ac220642f0792bcf60..b1466b8cb16d91810fe57b3cd0689bf0bf1d1586 100644 (file)
@@ -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@
index 313f179c67f7b2e8cbabc68e2c97ba477c2b6b4f..d8cf667788a3ce3d7ea2c938b0e59267615eabc3 100644 (file)
@@ -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@
index 3a606fdb40dbc7b204418a25528e6aca84a6a5c4..9bb90b228e8ad8a791a83b5a4a21a6ec2739624e 100644 (file)
@@ -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@
index 87111e709b8ea2819a54866387715c08bc5b2038..9114806b63f580422444635be7b0120587b80f1f 100644 (file)
@@ -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 ---------------------------------------------------------------------
index 0839375cf7af0b50d753168b27cdda014c13e6e0..c1b76a225b17bfdc811bb52196009dafd4d5ecd2 100644 (file)
@@ -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@
index 3bf801b4c74e64d89004cf2eb42a1915c74e8364..1d6dcce2348c31a87e8156de7cbffc09d3f59a35 100644 (file)
@@ -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@
This page took 1.103268 seconds and 5 git commands to generate.