Added PPC specific and some generic glibc headers. Taken from

glibc 2.3.2, which seems to be the version used in other places,
though I also found older files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15402 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-12-07 22:41:39 +00:00
parent 2034e20826
commit 8b150d6067
20 changed files with 821 additions and 32 deletions

View File

@ -1,13 +1,73 @@
SubDir HAIKU_TOP src system libroot posix arch ppc ;
SubDir HAIKU_TOP src system libroot posix glibc arch ppc ;
MergeObject posix_arch_$(TARGET_ARCH).o :
s_ceilf.c
s_floorf.c
s_fpclassify.c
s_fpclassifyf.c
s_fpclassifyl.c
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch $(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdlib ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc math ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;
if $(OPTIM) = -O0 {
OPTIM = -O ;
}
# don't compile with debugging
DEBUG = 0 ;
SubDirCcFlags -D_GNU_SOURCE -D_IEEE_LIBM ;
local genericSources =
cmp.c dbl2mpn.c divrem.c mpn2dbl.c mul.c mul_n.c
s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c s_modf.c s_modff.c s_modfl.c
w_atan2.c w_atan2f.c w_atan2l.c w_fmod.c w_fmodl.c w_fmodf.c
;
SEARCH on [ FGristFiles
s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c
] = [ FDirName $(SUBDIR) $(DOTDOT) ] ;
MergeObject posix_gnu_arch_$(TARGET_ARCH).o :
add_n.S
addmul_1.S
# e_acos.S
# e_atan2.S
# e_atan2f.S
# e_atan2l.c
# e_fmod.S
# e_fmodf.S
# e_fmodl.c
ldbl2mpn.c
mul_1.S
lshift.S
rshift.S
# s_ceil.S
s_ceilf.c
# s_ceill.S
# s_copysign.S
# s_copysignf.S
# s_copysignl.S
# s_fdim.S
# s_fdimf.S
# s_fdiml.S
# s_fabs.S
# s_fabsf.S
# s_fabsl.S
# s_finite.S
# s_finitef.S
# s_finitel.S
# s_floor.S
s_floorf.c
# s_floorl.S
# s_logb.S
# s_logbf.S
# s_logbl.c
# s_rint.S
# s_rintf.S
# s_rintl.c
# s_scalbn.S
# s_scalbnf.S
# s_scalbnl.S
sub_n.S
submul_1.S
$(genericSources)
;
SEARCH on [ FGristFiles $(genericSources) ]
= [ FDirName $(HAIKU_TOP) src system libroot posix glibc arch ] ;

View File

@ -1,6 +1,7 @@
SubDir HAIKU_TOP src system libroot posix glibc arch x86 ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch $(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdlib ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc math ;
@ -15,12 +16,15 @@ DEBUG = 0 ;
SubDirCcFlags -D_GNU_SOURCE -D_IEEE_LIBM ;
local genericSources =
cmp.c dbl2mpn.c divrem.c mpn2dbl.c mul.c mul_n.c
s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c s_modf.c s_modff.c s_modfl.c
w_atan2.c w_atan2f.c w_atan2l.c w_fmod.c w_fmodl.c w_fmodf.c
;
MergeObject posix_gnu_arch_$(TARGET_ARCH).o :
add_n.S
addmul_1.S
cmp.c
dbl2mpn.c
divrem.c
e_acos.S
e_atan2.S
e_atan2f.S
@ -29,10 +33,7 @@ MergeObject posix_gnu_arch_$(TARGET_ARCH).o :
e_fmodf.S
e_fmodl.c
ldbl2mpn.c
mpn2dbl.c
mul.c
mul_1.S
mul_n.c
lshift.S
rshift.S
s_ceil.S
@ -53,15 +54,9 @@ MergeObject posix_gnu_arch_$(TARGET_ARCH).o :
s_floor.S
s_floorf.S
s_floorl.S
s_fpclassify.c
s_fpclassifyf.c
s_fpclassifyl.c
s_logb.S
s_logbf.S
s_logbl.c
s_modf.c
s_modff.c
s_modfl.c
s_rint.S
s_rintf.S
s_rintl.c
@ -70,15 +65,9 @@ MergeObject posix_gnu_arch_$(TARGET_ARCH).o :
s_scalbnl.S
sub_n.S
submul_1.S
w_atan2.c
w_atan2f.c
w_atan2l.c
w_fmod.c
w_fmodf.c
w_fmodl.c
$(genericSources)
;
SEARCH on [ FGristFiles
cmp.c divrem.c mul.c mul_n.c dbl2mpn.c mpn2dbl.c s_fpclassify.c s_fpclassifyf.c s_fpclassifyl.c s_modf.c s_modff.c s_modfl.c
w_atan2.c w_atan2f.c w_atan2l.c w_fmod.c w_fmodl.c w_fmodf.c
] = [ FDirName $(HAIKU_TOP) src system libroot posix glibc arch ] ;
SEARCH on [ FGristFiles $(genericSources) ]
= [ FDirName $(HAIKU_TOP) src system libroot posix glibc arch ] ;

View File

@ -3,6 +3,7 @@ SubDir HAIKU_TOP src system libroot posix glibc ctype ;
SubDirSysHdrs $(SUBDIR) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;

View File

@ -2,6 +2,7 @@ SubDir HAIKU_TOP src system libroot posix glibc extensions ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;

View File

@ -0,0 +1,84 @@
/* Macros to swap the order of bytes in integer values.
Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
#ifndef _BITS_BYTESWAP_H
#define _BITS_BYTESWAP_H 1
/* Swap bytes in 16 bit value. */
#ifdef __GNUC__
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __bsx = (x); \
((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
#else
static __inline unsigned short int
__bswap_16 (unsigned short int __bsx)
{
return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
}
#endif
/* Swap bytes in 32 bit value. */
#ifdef __GNUC__
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __bsx = (x); \
((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
#else
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
(((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
}
#endif
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
| (((x) & 0x000000ff00000000ull) >> 8) \
| (((x) & 0x00000000ff000000ull) << 8) \
| (((x) & 0x0000000000ff0000ull) << 24) \
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56))
# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
unsigned int __l[2]; } __w, __r; \
if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
else \
{ \
__w.__ll = (x); \
__r.__l[0] = __bswap_32 (__w.__l[1]); \
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
#endif
#endif /* _BITS_BYTESWAP_H */

View File

@ -0,0 +1,28 @@
/* gmp-mparam.h -- Compiler/machine parameter header file.
Copyright (C) 1991,93,94,2002 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
#include <bits/wordsize.h>
#define BITS_PER_MP_LIMB __WORDSIZE
#define BYTES_PER_MP_LIMB (__WORDSIZE / 8)
#define BITS_PER_LONGINT __WORDSIZE
#define BITS_PER_INT 32
#define BITS_PER_SHORTINT 16
#define BITS_PER_CHAR 8

View File

@ -0,0 +1,37 @@
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* PowerPC can be little or big endian. Hopefully gcc will know... */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
# error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
# endif
# define __BYTE_ORDER __BIG_ENDIAN
#else
# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
# define __BYTE_ORDER __LITTLE_ENDIAN
# else
# warning Cannot determine current byte order, assuming big-endian.
# define __BYTE_ORDER __BIG_ENDIAN
# endif
#endif

View File

@ -0,0 +1,103 @@
/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
#endif
#include <features.h>
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
#ifdef __GNUC__
# if __GNUC_PREREQ(2,96)
# define HUGE_VAL (__extension__ 0x1.0p2047)
# else
# define HUGE_VAL \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
{ __l: 0x7ff0000000000000ULL }).__d)
# endif
#else /* not GCC */
# include <endian.h>
typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
# if __BYTE_ORDER == __BIG_ENDIAN
# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
# endif
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
# endif
static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
# define HUGE_VAL (__huge_val.__d)
#endif /* GCC. */
/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
#ifdef __USE_ISOC99
# ifdef __GNUC__
# if __GNUC_PREREQ(2,96)
# define HUGE_VALF (__extension__ 0x1.0p255f)
# else
# define HUGE_VALF \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
{ __l: 0x7f800000UL }).__d)
# endif
# else /* not GCC */
typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
# if __BYTE_ORDER == __BIG_ENDIAN
# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
# endif
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
# endif
static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
# define HUGE_VALF (__huge_valf.__f)
# endif /* GCC. */
/* Generally there is no separate `long double' format and it is the
same as `double'. */
# define HUGE_VALL HUGE_VAL
#endif /* __USE_ISOC99. */

View File

@ -0,0 +1,81 @@
/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc!
FIXME! This file does not deal with the -fshort-double option of
gcc! */
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
# ifdef __GNUC__
# if __STDC__ == 1
/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
typedef float float_t; /* `float' expressions are evaluated as
`float'. */
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
/* Signal that types stay as they were declared. */
# define FLT_EVAL_METHOD 0
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
# else
/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
typedef double float_t; /* `float' expressions are evaluated as
`double'. */
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
# endif
# else
/* Wild guess at types for float_t and double_t. */
typedef double float_t;
typedef double double_t;
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
# endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN (2147483647)
#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
declaration of all the `long double' function variants. */
# define __NO_LONG_DOUBLE_MATH 1
#endif

View File

@ -0,0 +1,101 @@
/* Inline math functions for powerpc.
Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#if defined __GNUC__ && !defined _SOFT_FLOAT
#ifdef __USE_ISOC99
# if __GNUC_PREREQ (2,96)
# define isgreater(x, y) __builtin_isgreater (x, y)
# define isgreaterequal(x, y) __builtin_isgreaterequal (x, y)
# define isless(x, y) __builtin_isless (x, y)
# define islessequal(x, y) __builtin_islessequal (x, y)
# define islessgreater(x, y) __builtin_islessgreater (x, y)
# define isunordered(x, y) __builtin_isunordered (x, y)
# else
# define __unordered_cmp(x, y) \
(__extension__ \
({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
unsigned __r; \
__asm__("fcmpu 7,%1,%2 ; mfcr %0" : "=r" (__r) : "f" (__x), "f"(__y) \
: "cr7"); \
__r; }))
# define isgreater(x, y) (__unordered_cmp (x, y) >> 2 & 1)
# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & 6) != 0)
# define isless(x, y) (__unordered_cmp (x, y) >> 3 & 1)
# define islessequal(x, y) ((__unordered_cmp (x, y) & 0xA) != 0)
# define islessgreater(x, y) ((__unordered_cmp (x, y) & 0xC) != 0)
# define isunordered(x, y) (__unordered_cmp (x, y) & 1)
# endif /* __GNUC_PREREQ (2,97) */
#endif /* __USE_ISOC99 */
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
# define __MATH_INLINE extern __inline
#endif /* __cplusplus */
#ifdef __USE_ISOC99
__MATH_INLINE long int lrint (double __x) __THROW;
__MATH_INLINE long int
lrint (double __x) __THROW
{
union {
double __d;
int __ll[2];
} __u;
__asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
return __u.__ll[1];
}
__MATH_INLINE long int lrintf (float __x) __THROW;
__MATH_INLINE long int
lrintf (float __x) __THROW
{
union {
double __d;
int __ll[2];
} __u;
__asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
return __u.__ll[1];
}
__MATH_INLINE double fdim (double __x, double __y) __THROW;
__MATH_INLINE double
fdim (double __x, double __y) __THROW
{
return __x < __y ? 0 : __x - __y;
}
__MATH_INLINE float fdimf (float __x, float __y) __THROW;
__MATH_INLINE float
fdimf (float __x, float __y) __THROW
{
return __x < __y ? 0 : __x - __y;
}
#endif /* __USE_ISOC99 */
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
#endif /* __GNUC__ && !_SOFT_FLOAT */

View File

@ -0,0 +1,48 @@
/* `NAN' constant for IEEE 754 machines.
Copyright (C) 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/nan.h> directly; include <math.h> instead."
#endif
/* IEEE Not A Number. */
#ifdef __GNUC__
# define NAN \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
{ __l: 0x7fc00000UL }).__d)
#else
# include <endian.h>
# if __BYTE_ORDER == __BIG_ENDIAN
# define __nan_bytes { 0x7f, 0xc0, 0, 0 }
# endif
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define __nan_bytes { 0, 0, 0xc0, 0x7f }
# endif
static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes };
# define NAN (__nan_union.__d)
#endif /* GCC. */

View File

@ -0,0 +1,8 @@
/* Determine the wordsize from the preprocessor defines. */
#if defined __powerpc64__
# define __WORDSIZE 64
# define __WORDSIZE_COMPAT32 1
#else
# define __WORDSIZE 32
#endif

View File

@ -0,0 +1,240 @@
//#if !defined __ASSEMBLER__ && !defined _ISOMAC && !defined __OPTIMIZE__
//# error "glibc cannot be compiled without optimization"
//#endif
/* Another evil option when it comes to compiling the C library is
--ffast-math since it alters the ABI. */
#if defined __FAST_MATH__ && !defined TEST_FAST_MATH
# error "glibc must not be compiled with -ffast-math"
#endif
/* Define if using GNU ld, with support for weak symbols in a.out,
and for symbol set and warning messages extensions in a.out and ELF.
This implies HAVE_WEAK_SYMBOLS; set by --with-gnu-ld. */
#define HAVE_GNU_LD 1
/* Define if using ELF, which supports weak symbols.
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
#define HAVE_ELF 1
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#define NO_UNDERSCORES 1
/* Define if weak symbols are available via the `.weak' directive. */
#define HAVE_ASM_WEAK_DIRECTIVE 1
/* Define if weak symbols are available via the `.weakext' directive. */
#undef HAVE_ASM_WEAKEXT_DIRECTIVE
/* Define to the assembler line separator character for multiple
assembler instructions per line. Default is `;' */
#undef ASM_LINE_SEP
/* Define if not using ELF, but `.init' and `.fini' sections are available. */
#undef HAVE_INITFINI
/* Define if __attribute__((section("foo"))) puts quotes around foo. */
/*#define HAVE_SECTION_QUOTES 1
[zooey]: defining this causes assembler errors, and I don't think
that any BeOS-gcc actually produces quotes in sections...
*/
#undef HAVE_SECTION_QUOTES
/* Define if using the GNU assembler, gas. */
#define HAVE_GNU_AS 1
/* Define if the assembler supports the `.set' directive. */
#define HAVE_ASM_SET_DIRECTIVE 1
/* Define to the name of the assembler's directive for
declaring a symbol global (default `.globl'). */
#define ASM_GLOBAL_DIRECTIVE .globl
/* Define to the prefix before `object' or `function' in the
assembler's `.type' directive, if it has one. */
#undef ASM_TYPE_DIRECTIVE_PREFIX
/* Define a symbol_name as a global .symbol_name for ld. */
#undef HAVE_ASM_GLOBAL_DOT_NAME
/* Define if the assembler generates debugging information directly. */
#undef HAVE_CPP_ASM_DEBUGINFO
/* Define if _Unwind_Find_FDE should be exported from glibc. */
#undef EXPORT_UNWIND_FIND_FDE
/* Define to use GNU libio instead of GNU stdio.
This is defined by configure under --enable-libio. */
#define USE_IN_LIBIO 1
/* Define if using ELF and the assembler supports the `.previous'
directive. */
#define HAVE_ASM_PREVIOUS_DIRECTIVE 1
/* Define if using ELF and the assembler supports the `.popsection'
directive. */
#undef HAVE_ASM_POPSECTION_DIRECTIVE
/* Define if versioning of the library is wanted. */
#undef DO_VERSIONING
/* Defined to the oldest ABI we support, like 2.1. */
#undef GLIBC_OLDEST_ABI
/* Define if static NSS modules are wanted. */
#undef DO_STATIC_NSS
/* Define if gcc uses DWARF2 unwind information for exception support. */
#define HAVE_DWARF2_UNWIND_INFO 1
/* Define if gcc uses DWARF2 unwind information for exception support
with static variable. */
#define HAVE_DWARF2_UNWIND_INFO_STATIC 1
/* Define if the compiler supports __builtin_expect. */
#undef HAVE_BUILTIN_EXPECT
/* Define if the compiler supports __builtin_memset. */
#undef HAVE_BUILTIN_MEMSET
/* Define if the __thread keyword is supported. */
#undef HAVE___THREAD
/* Define if the compiler supports __attribute__((tls_model(""))). */
#undef HAVE_TLS_MODEL_ATTRIBUTE
/* Define if the regparm attribute shall be used for local functions
(gcc on ix86 only). */
#define USE_REGPARMS 1
/* Defined on PowerPC if the GCC being used has a problem with clobbering
certain registers (CR0, MQ, CTR, LR) in asm statements. */
#undef BROKEN_PPC_ASM_CR0
/* TODO: bonefish: Do we need to define this? */
/* Defined on SPARC if ld doesn't handle R_SPARC_WDISP22 against .hidden
symbol. sysdeps/sparc/sparc32/elf/configure. */
#undef BROKEN_SPARC_WDISP22
/* Define if the linker supports the -z combreloc option. */
#undef HAVE_Z_COMBRELOC
/* Define if the assembler supported .protected. */
#undef HAVE_PROTECTED
/* Define if the assembler supported .hidden. */
#undef HAVE_HIDDEN
/* Define if the compiler supports __attribute__ ((visibility (...))). */
#undef HAVE_VISIBILITY_ATTRIBUTE
/* Define if the compiler doesn't support __attribute__ ((visibility (...)))
together with __asm__ redirection properly. */
#undef HAVE_BROKEN_VISIBILITY_ATTRIBUTE
/* Define if the compiler doesn't support __attribute__ ((alias (...)))
together with __asm__ redirection properly. */
#undef HAVE_BROKEN_ALIAS_ATTRIBUTE
/* Define if _rtld_local structure should be forced into .sdata section. */
#undef HAVE_SDATA_SECTION
/* Define if binutils support TLS handling. */
#undef HAVE_TLS_SUPPORT
/* Define if the linker supports .preinit_array/.init_array/.fini_array
sections. */
#undef HAVE_INITFINI_ARRAY
/* Define if the access to static and hidden variables is position independent
and does not need relocations. */
#undef PI_STATIC_AND_HIDDEN
/* Define this to disable the `hidden_proto' et al macros in
include/libc-symbols.h that avoid PLT slots in the shared objects. */
#undef NO_HIDDEN
/* Defined to some form of __attribute__ ((...)) if the compiler supports
a different, more efficient calling convention. */
#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute__ ((regparm (3), stdcall))
#endif
/* Linux specific: minimum supported kernel version. */
#undef __LINUX_KERNEL_VERSION
/* Override abi-tags ABI version if necessary. */
#undef __ABI_TAG_VERSION
/* An extension in gcc 2.96 and up allows the subtraction of two
local labels. */
#undef HAVE_SUBTRACT_LOCAL_LABELS
/* bash 2.0 introduced the _XXX_GNU_nonoption_argv_flags_ variable to help
getopt determine whether a parameter is a flag or not. This features
was disabled later since it caused trouble. We are by default therefore
disabling the support as well. */
#undef USE_NONOPTION_FLAGS
/* Mach/Hurd specific: define if mig supports the `retcode' keyword. */
#undef HAVE_MIG_RETCODE
/* Mach specific: define if the `host_page_size' RPC is available. */
#undef HAVE_HOST_PAGE_SIZE
/* Mach/i386 specific: define if the `i386_io_perm_*' RPCs are available. */
#undef HAVE_I386_IO_PERM_MODIFY
/* Mach/i386 specific: define if the `i386_set_gdt' RPC is available. */
#undef HAVE_I386_SET_GDT
/*
*/
#ifndef _LIBC
/* These symbols might be defined by some sysdeps configures.
They are used only in miscellaneous generator programs, not
in compiling libc itself. */
/* sysdeps/generic/configure.in */
#undef HAVE_PSIGNAL
/* sysdeps/unix/configure.in */
#define HAVE_STRERROR
/* sysdeps/unix/common/configure.in */
#undef HAVE_SYS_SIGLIST
#undef HAVE__SYS_SIGLIST
#undef HAVE__CTYPE_
#undef HAVE___CTYPE_
#undef HAVE___CTYPE
#undef HAVE__CTYPE__
#undef HAVE__CTYPE
#undef HAVE__LOCP
#endif
/*
*/
#ifdef _LIBC
/* The zic and zdump programs need these definitions. */
#define HAVE_STRERROR 1
/* The locale code needs these definitions. */
#define HAVE_REGEX 1
//#define HAVE_MMAP 1
#undef HAVE_MMAP
#endif

View File

@ -16,6 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include_next <sysdep.h>
#ifdef __ASSEMBLER__
/* Symbolic names for the registers. The only portable way to write asm

View File

@ -2,6 +2,7 @@ SubDir HAIKU_TOP src system libroot posix glibc libio ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdio-common ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;

View File

@ -2,6 +2,7 @@ SubDir HAIKU_TOP src system libroot posix glibc locale ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;

View File

@ -5,6 +5,7 @@ SubDirCcFlags -D_GNU_SOURCE -DUSE_IN_LIBIO ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdio-common ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;

View File

@ -1,6 +1,7 @@
SubDir HAIKU_TOP src system libroot posix glibc stdlib ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch $(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;

View File

@ -2,6 +2,7 @@ SubDir HAIKU_TOP src system libroot posix glibc wcsmbs ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc wcsmbs ;

View File

@ -2,6 +2,7 @@ SubDir HAIKU_TOP src system libroot posix glibc wctype ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
$(TARGET_ARCH) ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
#SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
#SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc wcsmbs ;