This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

std_limits.h os_defines.h


	I have committed the macros which will be used by the revised
std_limits.h being developed by Gaby and Mark.  I tried the best I could
to figure out the definitions for the various targets.

	There does not seem to be a way to determine if x86 is operating
in 96-bit or 128-bit long double mode.  Compaq Tru64 Unix seems to use the
generic os_defines.h.  Presumably RTEMS and others use it as well.  From a
design perspective, I don't know if we want to add OS directories for
these new macros or merge everything into the generic version to avoid
duplication and maintenance problems.

David


        * config/os/aix/bits/os_defines.h: Define std_limits.h macros.
        * config/os/generic/bits/os_defines.h: Likewise.
        * config/os/gnu-linux/bits/os_defines.h: Likewise.
        * config/os/hpux/bits/os_defines.h: Likewise.
        * config/os/irix/irix6.5/bits/os_defines.h: Likewise.
        * config/os/solaris/solaris2.7/bits/os_defines.h: Likewise.

Index: config/os/aix/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/aix/bits/os_defines.h,v
retrieving revision 1.5
diff -c -p -r1.5 os_defines.h
*** os_defines.h	2000/11/04 03:00:10	1.5
--- os_defines.h	2001/08/09 17:57:44
***************
*** 55,59 ****
--- 55,70 ----
  #undef _G_USING_THUNKS
  #define _G_USING_THUNKS 0
  
+ #define __glibcpp_plain_char_is_signed false
+ #define __glibcpp_long_double_bits 64
+ 
+ #if !defined(_AIX51) || !defined(__64BIT__)
+ #define __glibcpp_wchar_t_bits 16
+ #endif
+ 
+ #ifdef __64BIT__
+ #define __glibcpp_long_bits 64
+ #endif
+ 
  #endif
  
Index: config/os/generic/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/generic/bits/os_defines.h,v
retrieving revision 1.4
diff -c -p -r1.4 os_defines.h
*** os_defines.h	2000/12/07 06:44:48	1.4
--- os_defines.h	2001/08/09 17:57:44
***************
*** 34,37 ****
--- 34,41 ----
  // System-specific #define, typedefs, corrections, etc, go here.  This
  // file will come before all others.
  
+ #ifdef __alpha__
+ #define __glibcpp_long_bits 64
+ #endif
+ 
  #endif
Index: config/os/gnu-linux/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/gnu-linux/bits/os_defines.h,v
retrieving revision 1.10
diff -c -p -r1.10 os_defines.h
*** os_defines.h	2001/05/24 20:51:33	1.10
--- os_defines.h	2001/08/09 17:57:44
*************** typedef __loff_t __off64_t;
*** 63,70 ****
--- 63,80 ----
  #  define __NO_STRING_INLINES
  # endif
  
+ #if defined (__powerpc__) || defined (__s390__) || defined (__s390x__)
+ #define __glibcpp_plain_char_is_signed false
+ #define __glibcpp_wchar_t_is_signed true
  #endif
  
+ #if defined (__alpha__) || defined (__powerpc64__) || (defined (__sparc__) && defined(__arch64__)) || defined (__s390__) || defined (__s390x__)
+ #define __glibcpp_long_bits 64
+ #endif
  
+ #if defined (__alpha__) || defined (__powerpc64__)
+ #define __glibcpp_long_double_bits 64
+ #endif
  
+ #endif
  
Index: config/os/hpux/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/hpux/bits/os_defines.h,v
retrieving revision 1.1
diff -c -p -r1.1 os_defines.h
*** os_defines.h	2000/12/06 03:23:34	1.1
--- os_defines.h	2001/08/09 17:57:44
***************
*** 39,44 ****
--- 39,49 ----
  #define __off64_t off64_t
  #define __ssize_t ssize_t
  
+ #define __glibcpp_wchar_t_is_signed false
+ 
+ #ifdef __LP64__
+ #define __glibcpp_long_bits 64
  #endif
  
+ #endif
  
Index: config/os/irix/irix6.5/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/irix/irix6.5/bits/os_defines.h,v
retrieving revision 1.1
diff -c -p -r1.1 os_defines.h
*** os_defines.h	2001/03/07 18:29:32	1.1
--- os_defines.h	2001/08/09 17:57:44
***************
*** 52,57 ****
--- 52,63 ----
  /* GCC does not use thunks on IRIX.  */
  #define _G_USING_THUNKS 0
  
+ #define __glibcpp_long_double_bits 64
+ 
+ #if __LONG_MAX__ > 2147483647
+ #define __glibcpp_wchar_t_bits 64
+ #define __glibcpp_long_bits 64
  #endif
  
+ #endif
  
Index: config/os/solaris/solaris2.7/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/solaris/solaris2.7/bits/os_defines.h,v
retrieving revision 1.8
diff -c -p -r1.8 os_defines.h
*** os_defines.h	2001/06/12 23:09:08	1.8
--- os_defines.h	2001/08/09 17:57:44
***************
*** 45,48 ****
--- 45,52 ----
  // Without this all the libio vtbls are offset wrongly.
  #define _G_USING_THUNKS 0
  
+ #if defined(__sparc_v9) || defined(__arch64__)
+ #define __glibcpp_long_bits 64
+ #endif
+ 
  #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]