From 88ccb61ad52006944659f24d54f120d9c844858e Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 9 Nov 2005 18:01:16 +0000 Subject: [PATCH] Removed GCC headers float.h and varargs.h. Fixed limits.h. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14798 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/float.h | 100 --------------- headers/posix/limits.h | 17 +-- headers/posix/varargs.h | 270 ---------------------------------------- 3 files changed, 6 insertions(+), 381 deletions(-) delete mode 100644 headers/posix/float.h delete mode 100644 headers/posix/varargs.h diff --git a/headers/posix/float.h b/headers/posix/float.h deleted file mode 100644 index 70757ca1ef..0000000000 --- a/headers/posix/float.h +++ /dev/null @@ -1,100 +0,0 @@ -// XXX taken from /boot/develop/tools/gnupro/lib/gcc-lib/i586-beos/2.9-beos-991026/include -// XXX From GCC, exact license unknown. Must be LGPL or better :) -// XXX Should be replaced as soon as possible - -/* float.h for target with IEEE 32 bit and 64 bit floating point formats */ -#ifndef _FLOAT_H_ -#define _FLOAT_H_ -/* Produced by enquire version 4.3, CWI, Amsterdam */ - - /* Radix of exponent representation */ -#undef FLT_RADIX -#define FLT_RADIX 2 - /* Number of base-FLT_RADIX digits in the significand of a float */ -#undef FLT_MANT_DIG -#define FLT_MANT_DIG 24 - /* Number of decimal digits of precision in a float */ -#undef FLT_DIG -#define FLT_DIG 6 - /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ -#undef FLT_ROUNDS -#define FLT_ROUNDS 1 - /* Difference between 1.0 and the minimum float greater than 1.0 */ -#undef FLT_EPSILON -#define FLT_EPSILON 1.19209290e-07F - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ -#undef FLT_MIN_EXP -#define FLT_MIN_EXP (-125) - /* Minimum normalised float */ -#undef FLT_MIN -#define FLT_MIN 1.17549435e-38F - /* Minimum int x such that 10**x is a normalised float */ -#undef FLT_MIN_10_EXP -#define FLT_MIN_10_EXP (-37) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ -#undef FLT_MAX_EXP -#define FLT_MAX_EXP 128 - /* Maximum float */ -#undef FLT_MAX -#define FLT_MAX 3.40282347e+38F - /* Maximum int x such that 10**x is a representable float */ -#undef FLT_MAX_10_EXP -#define FLT_MAX_10_EXP 38 - - /* Number of base-FLT_RADIX digits in the significand of a double */ -#undef DBL_MANT_DIG -#define DBL_MANT_DIG 53 - /* Number of decimal digits of precision in a double */ -#undef DBL_DIG -#define DBL_DIG 15 - /* Difference between 1.0 and the minimum double greater than 1.0 */ -#undef DBL_EPSILON -#define DBL_EPSILON 2.2204460492503131e-16 - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ -#undef DBL_MIN_EXP -#define DBL_MIN_EXP (-1021) - /* Minimum normalised double */ -#undef DBL_MIN -#define DBL_MIN 2.2250738585072014e-308 - /* Minimum int x such that 10**x is a normalised double */ -#undef DBL_MIN_10_EXP -#define DBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ -#undef DBL_MAX_EXP -#define DBL_MAX_EXP 1024 - /* Maximum double */ -#undef DBL_MAX -#define DBL_MAX 1.7976931348623157e+308 - /* Maximum int x such that 10**x is a representable double */ -#undef DBL_MAX_10_EXP -#define DBL_MAX_10_EXP 308 - - /* Number of base-FLT_RADIX digits in the significand of a long double */ -#undef LDBL_MANT_DIG -#define LDBL_MANT_DIG 53 - /* Number of decimal digits of precision in a long double */ -#undef LDBL_DIG -#define LDBL_DIG 15 - /* Difference between 1.0 and the minimum long double greater than 1.0 */ -#undef LDBL_EPSILON -#define LDBL_EPSILON 2.2204460492503131e-16L - /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ -#undef LDBL_MIN_EXP -#define LDBL_MIN_EXP (-1021) - /* Minimum normalised long double */ -#undef LDBL_MIN -#define LDBL_MIN 2.2250738585072014e-308L - /* Minimum int x such that 10**x is a normalised long double */ -#undef LDBL_MIN_10_EXP -#define LDBL_MIN_10_EXP (-307) - /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ -#undef LDBL_MAX_EXP -#define LDBL_MAX_EXP 1024 - /* Maximum long double */ -#undef LDBL_MAX -#define LDBL_MAX 1.7976931348623157e+308L - /* Maximum int x such that 10**x is a representable long double */ -#undef LDBL_MAX_10_EXP -#define LDBL_MAX_10_EXP 308 - -#endif /* _FLOAT_H_ */ diff --git a/headers/posix/limits.h b/headers/posix/limits.h index 27a80d085d..9006dda48b 100644 --- a/headers/posix/limits.h +++ b/headers/posix/limits.h @@ -1,23 +1,18 @@ -#ifndef _LIMITS_H_ -#define _LIMITS_H_ +#ifndef _LIBC_LIMITS_H_ +#define _LIBC_LIMITS_H_ + // Note: The header guard is checked in gcc's limits.h. #include /* for DBL_DIG, FLT_DIG, etc */ -/* XXX - commented out until we have GCC headers as this stops us - * building - * For now we'll just use the values given for non-intel platforms. - */ - /* _GCC_LIMITS_H_ is defined by GCC's internal limits.h to avoid * collisions with any defines in this file. */ -/* #if __INTEL__ # ifndef _GCC_LIMITS_H_ # include_next # endif #else -*/ + #define CHAR_BIT (8) #define SCHAR_MIN (-127-1) @@ -44,7 +39,7 @@ #define INT_MAX LONG_MAX #define UINT_MAX ULONG_MAX -//#endif /* else not INTEL */ +#endif /* else not INTEL */ #define LONGLONG_MIN (-9223372036854775807LL - 1) /* these are Be specific */ #define LONGLONG_MAX (9223372036854775807LL) @@ -94,4 +89,4 @@ #define _POSIX_TTY_NAME_MAX (256) #define _POSIX_TZNAME_MAX (3) -#endif /* _LIMITS_H_ */ +#endif /* _LIBC_LIMITS_H_ */ diff --git a/headers/posix/varargs.h b/headers/posix/varargs.h deleted file mode 100644 index 5822cc0aaf..0000000000 --- a/headers/posix/varargs.h +++ /dev/null @@ -1,270 +0,0 @@ -// XXX taken from /boot/develop/tools/gnupro/lib/gcc-lib/i586-beos/2.9-beos-991026/include -// XXX From GCC, exact license unknown. Must be LGPL or better :) -// XXX Doesn't belong into posix, should be replaced as soon as possible - -/* Record that this is varargs.h; this turns off stdarg.h. */ - -#ifndef _VARARGS_H -#define _VARARGS_H - -#ifdef __sparc__ -#include "va-sparc.h" -#else -#ifdef __spur__ -#include "va-spur.h" -#else -#ifdef __mips__ -#include "va-mips.h" -#else -#ifdef __i860__ -#include "va-i860.h" -#else -#ifdef __pyr__ -#include "va-pyr.h" -#else -#ifdef __clipper__ -#include "va-clipper.h" -#else -#ifdef __m88k__ -#include "va-m88k.h" -#else -#if defined(__hppa__) || defined(hp800) -#include "va-pa.h" -#else -#ifdef __i960__ -#include "va-i960.h" -#else -#ifdef __alpha__ -#include "va-alpha.h" -#else -#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) -#include "va-h8300.h" -#else -#if defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) -#include "va-ppc.h" -#else -#ifdef __arc__ -#include "va-arc.h" -#else -/* CYGNUS LOCAL -- meissner/d10v */ -#ifdef __D10V__ -#include "va-d10v.h" -#else -/* END CYGNUS LOCAL -- meissner/d10v */ -#ifdef __M32R__ -#include "va-m32r.h" -#else -#ifdef __sh__ -#include "va-sh.h" -#else -#ifdef __mn10300__ -#include "va-mn10300.h" -#else -#ifdef __mn10200__ -#include "va-mn10200.h" -#else -#ifdef __v850__ -#include "va-v850.h" -#else -/* CYGNUS LOCAL v850e */ -#ifdef __v850e__ -#include "va-v850.h" -#else -#ifdef __v850ea__ -#include "va-v850.h" -#else -/* END CYGNUS LOCAL */ -/* CYGNUS LOCAL d30v */ -#ifdef __D30V__ -#include "va-d30v.h" -#else -/* END CYGNUS LOCAL d30v */ -#if defined (_TMS320C4x) || defined (_TMS320C3x) -#include -#else -/* CYGNUS LOCAL fr30 */ -#ifdef __fr30__ -#include "va-fr30.h" -#else -/* END CYGNUS LOCAL fr30 */ - -#ifdef __NeXT__ - -/* On Next, erase any vestiges of stdarg.h. */ - -#ifdef _ANSI_STDARG_H_ -#define _VA_LIST_ -#endif -#define _ANSI_STDARG_H_ - -#undef va_alist -#undef va_dcl -#undef va_list -#undef va_start -#undef va_end -#undef __va_rounded_size -#undef va_arg -#endif /* __NeXT__ */ - -/* In GCC version 2, we want an ellipsis at the end of the declaration - of the argument list. GCC version 1 can't parse it. */ - -#if __GNUC__ > 1 -#define __va_ellipsis ... -#else -#define __va_ellipsis -#endif - -/* These macros implement traditional (non-ANSI) varargs - for GNU C. */ - -#define va_alist __builtin_va_alist -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl int __builtin_va_alist; __va_ellipsis - -/* Define __gnuc_va_list, just as in gstdarg.h. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__BEOS__) -typedef char *__gnuc_va_list; -#else -typedef void *__gnuc_va_list; -#endif -#endif - -#define va_start(AP) AP=(char *) &__builtin_va_alist - -#define va_end(AP) ((void)0) - -#if defined(sysV68) -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (short) - 1) / sizeof (short)) * sizeof (short)) -#else -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#endif - -#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) -/* This is for little-endian machines; small args are padded upward. */ -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) -#else /* big-endian */ -/* This is for big-endian machines; small args are padded downward. */ -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) \ - - ((sizeof (TYPE) < __va_rounded_size (char) \ - ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) -#endif /* big-endian */ - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -/* CYGNUS LOCAL fr30 */ -#endif /* not fr30 */ -/* END CYGNUS LOCAL fr30 */ -#endif /* not TMS320C3x or TMS320C4x */ -/* CYGNUS LOCAL d30v */ -#endif /* not d30v */ -/* END CYGNUS LOCAL d30v */ -/* CYGNUS LOCAL v850e */ -#endif /* not v850ea */ -#endif /* not v850e */ -/* END CYGNUS LOCAL */ -#endif /* not v850 */ -#endif /* not mn10200 */ -#endif /* not mn10300 */ -#endif /* not sh */ -#endif /* not m32r */ -/* CYGNUS LOCAL -- meissner/d10v */ -#endif /* not d10v */ -/* END CYGNUS LOCAL -- meissner/d10v */ -#endif /* not arc */ -#endif /* not powerpc with V.4 calling sequence */ -#endif /* not h8300 */ -#endif /* not alpha */ -#endif /* not i960 */ -#endif /* not hppa */ -#endif /* not m88k */ -#endif /* not clipper */ -#endif /* not pyr */ -#endif /* not i860 */ -#endif /* not mips */ -#endif /* not spur */ -#endif /* not sparc */ -#endif /* not _VARARGS_H */ - -/* Define va_list from __gnuc_va_list. */ - -#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ -#undef _VA_LIST -#endif - -#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) -/* SVR4.2 uses _VA_LIST for an internal alias for va_list, - so we must avoid testing it and setting it here. - SVR4 uses _VA_LIST as a flag in stdarg.h, but we should - have no conflict with that. */ -#ifndef _VA_LIST_ -#define _VA_LIST_ -#ifdef __i860__ -#ifndef _VA_LIST -#define _VA_LIST va_list -#endif -#endif /* __i860__ */ -typedef __gnuc_va_list va_list; -#ifdef _SCO_DS -#define __VA_LIST -#endif -#endif /* _VA_LIST_ */ - -#else /* not __svr4__ || _SCO_DS */ - -/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. - But on BSD NET2 we must not test or define or undef it. - (Note that the comments in NET 2's ansi.h - are incorrect for _VA_LIST_--see stdio.h!) */ -/* Michael Eriksson at Thu Sep 30 11:00:57 1993: - Sequent defines _VA_LIST_ in to be the type to - use for va_list (``typedef _VA_LIST_ va_list'') */ -#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) -/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ -#ifndef _VA_LIST_DEFINED -/* The macro _VA_LIST is used in SCO Unix 3.2. */ -#ifndef _VA_LIST -/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ -#ifndef _VA_LIST_T_H -/* The macro __va_list__ is used by BeOS. */ -#ifndef __va_list__ -typedef __gnuc_va_list va_list; -#endif /* not __va_list__ */ -#endif /* not _VA_LIST_T_H */ -#endif /* not _VA_LIST */ -#endif /* not _VA_LIST_DEFINED */ -#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) -#define _VA_LIST_ -#endif -#ifndef _VA_LIST -#define _VA_LIST -#endif -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED -#endif -#ifndef _VA_LIST_T_H -#define _VA_LIST_T_H -#endif -#ifndef __va_list__ -#define __va_list__ -#endif - -#endif /* not _VA_LIST_, except on certain systems */ - -#endif /* not __svr4__ */ - -/* The next BSD release (if there is one) wants this symbol to be - undefined instead of _VA_LIST_. */ -#ifdef _BSD_VA_LIST -#undef _BSD_VA_LIST -#endif