mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 21:11:28 +01:00
ARM/libroot: import files from glibc-ports-2.9
There is no ARM port for the glibc version we're using mostly, so I'm picking up files from more recent glibc and will probably need to hack around in them, as glibc seem to have cleaned up their arch support a lot these days.
This commit is contained in:
parent
5dcd116f40
commit
e054288f9d
@ -0,0 +1,19 @@
|
||||
#ifndef _ENDIAN_H
|
||||
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
|
||||
#endif
|
||||
|
||||
/* ARM can be either big or little endian. */
|
||||
#ifdef __ARMEB__
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
/* FPA floating point units are always big-endian, irrespective of the
|
||||
CPU endianness. VFP floating point units use the same endianness
|
||||
as the rest of the system. */
|
||||
#ifdef __VFP_FP__
|
||||
#define __FLOAT_WORD_ORDER __BYTE_ORDER
|
||||
#else
|
||||
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
|
||||
#endif
|
@ -0,0 +1,56 @@
|
||||
/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
|
||||
Used by <stdlib.h> and <math.h> functions for overflow.
|
||||
ARM version.
|
||||
Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 2004
|
||||
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
|
||||
|
||||
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
|
||||
|
||||
#if __GNUC_PREREQ(3,3)
|
||||
# define HUGE_VAL (__builtin_huge_val())
|
||||
#elif __GNUC_PREREQ(2,96)
|
||||
# define HUGE_VAL (__extension__ 0x1.0p2047)
|
||||
#elif defined __GNUC__
|
||||
|
||||
# define HUGE_VAL \
|
||||
(__extension__ \
|
||||
((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
|
||||
{ __l: 0x000000007ff00000ULL }).__d)
|
||||
|
||||
#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 { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 }
|
||||
# endif
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }
|
||||
# endif
|
||||
|
||||
static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
|
||||
# define HUGE_VAL (__huge_val.__d)
|
||||
|
||||
#endif /* GCC. */
|
@ -0,0 +1,43 @@
|
||||
/* Copyright (C) 1999, 2000, 2004, 2006, 2007
|
||||
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
|
||||
|
||||
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
|
||||
# define _MATH_H_MATHDEF 1
|
||||
|
||||
/* GCC does not promote `float' values to `double'. */
|
||||
typedef float float_t; /* `float' expressions are evaluated as
|
||||
`float'. */
|
||||
typedef double double_t; /* `double' expressions are evaluated as
|
||||
`double'. */
|
||||
|
||||
/* 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'. This disables the
|
||||
declaration of all the `long double' function variants. */
|
||||
# define __NO_LONG_DOUBLE_MATH 1
|
||||
#endif
|
28
src/system/libroot/posix/glibc/include/arch/arm/stackinfo.h
Normal file
28
src/system/libroot/posix/glibc/include/arch/arm/stackinfo.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* Copyright (C) 2001 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. */
|
||||
|
||||
/* This file contains a bit of information about the stack allocation
|
||||
of the processor. */
|
||||
|
||||
#ifndef _STACKINFO_H
|
||||
#define _STACKINFO_H 1
|
||||
|
||||
/* On Arm the stack grows down. */
|
||||
#define _STACK_GROWS_DOWN 1
|
||||
|
||||
#endif /* stackinfo.h */
|
Loading…
x
Reference in New Issue
Block a user