OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [linux/] [machine/] [i386/] [huge_val.h] - Blame information for rev 262

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
#if 0 /* We don't need this file because math.h defines these values.  */
2
 
3
/* `HUGE_VAL' constants for ix86 (where it is infinity).
4
   Used by <stdlib.h> and <math.h> functions for overflow.
5
   Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
6
   This file is part of the GNU C Library.
7
 
8
   The GNU C Library is free software; you can redistribute it and/or
9
   modify it under the terms of the GNU Lesser General Public
10
   License as published by the Free Software Foundation; either
11
   version 2.1 of the License, or (at your option) any later version.
12
 
13
   The GNU C Library is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
   Lesser General Public License for more details.
17
 
18
   You should have received a copy of the GNU Lesser General Public
19
   License along with the GNU C Library; if not, write to the Free
20
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
   02111-1307 USA.  */
22
 
23
#include <features.h>
24
 
25
/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL.  */
26
 
27
# if __GNUC_PREREQ(2,96)
28
 
29
#  define HUGE_VALF (__extension__ 0x1.0p255f)
30
#  define HUGE_VALL (__extension__ 0x1.0p32767L)
31
 
32
# else
33
 
34
#  define __HUGE_VALF_bytes     { 0, 0, 0x80, 0x7f }
35
 
36
#  define __huge_valf_t union { unsigned char __c[4]; float __f; }
37
#  ifdef        __GNUC__
38
#   define HUGE_VALF    (__extension__ \
39
                         ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
40
#  else /* Not GCC.  */
41
static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
42
#   define HUGE_VALF    (__huge_valf.__f)
43
#  endif        /* GCC.  */
44
 
45
 
46
#  define __HUGE_VALL_bytes     { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
47
 
48
#  define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
49
#  ifdef __GNUC__
50
#   define HUGE_VALL    (__extension__ \
51
                         ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
52
#  else /* Not GCC.  */
53
static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
54
#   define HUGE_VALL    (__huge_vall.__ld)
55
#  endif /* GCC.  */
56
 
57
# endif /* GCC 2.95 */
58
 
59
#endif /* if 0 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.