This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: *-*-freebsd* under new <limits>
- To: libstdc++ at gcc dot gnu dot org
- Subject: PATCH: *-*-freebsd* under new <limits>
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Fri, 24 Aug 2001 17:02:51 -0500 (CDT)
- CC: gcc-patches at gcc dot gnu dot org
- References: <200108220521.f7M5LdJ29893@latour.rsch.comm.mot.com>
- Reply-to: rittle at labs dot mot dot com
Posted to libstdc++ already. Now, approved and applied. Bootstrapped
and checked on i386-*-freebsd*.
18_support/numeric_limits.cc still fails on i386-unknown-freebsd4.3
but now only due (?) to extra precision in `long double' compared to
the limits expressed in the <float.h> system header file.
* config/cpu/i386/bits/limits.h (__glibcpp_long_double_bits): Only
define if not already provided by per-OS file.
* config/os/bsd/freebsd/bits/os_defines.h (__glibcpp_long_double_bits):
Define.
Index: libstdc++-v3/config/cpu/i386/bits/limits.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/cpu/i386/bits/limits.h,v
retrieving revision 1.2
diff -c -r1.2 limits.h
*** limits.h 2001/08/13 22:26:07 1.2
--- limits.h 2001/08/22 04:55:54
***************
*** 28,33 ****
--- 28,36 ----
#ifndef _GLIBCPP_CPU_LIMITS
#define _GLIBCPP_CPU_LIMITS 1
+ // Some operating systems set this
+ #ifndef __glibcpp_long_double_bits
#define __glibcpp_long_double_bits 80
+ #endif
#endif
Index: libstdc++-v3/config/os/bsd/freebsd/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/bsd/freebsd/bits/os_defines.h,v
retrieving revision 1.2
diff -c -r1.2 os_defines.h
*** os_defines.h 2001/06/12 23:09:05 1.2
--- os_defines.h 2001/08/22 04:55:54
***************
*** 35,40 ****
--- 35,42 ----
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
+ #define __glibcpp_long_double_bits __glibcpp_double_bits
+
#define _GLIBCPP_AVOID_FSEEK 1
#endif