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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [linux/] [include/] [complex.h] - Diff between revs 148 and 158

Only display areas with differences | Details | Blame | View Log

Rev 148 Rev 158
/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
   This file is part of the GNU C Library.
   This file is part of the GNU C Library.
 
 
   The GNU C Library is free software; you can redistribute it and/or
   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.
   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,
   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.
   Lesser General Public License for more details.
 
 
   You should have received a copy of the GNU Lesser General Public
   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
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */
   02111-1307 USA.  */
 
 
/*
/*
 *      ISO C99:  7.3 Complex arithmetic        <complex.h>
 *      ISO C99:  7.3 Complex arithmetic        <complex.h>
 */
 */
 
 
#ifndef _COMPLEX_H
#ifndef _COMPLEX_H
#define _COMPLEX_H      1
#define _COMPLEX_H      1
 
 
#include <sys/types.h>
#include <sys/types.h>
#include <features.h>
#include <features.h>
 
 
__BEGIN_DECLS
__BEGIN_DECLS
 
 
#define __CONCAT(x,y) x ## y
#define __CONCAT(x,y) x ## y
/* We might need to add support for more compilers here.  But since ISO
/* We might need to add support for more compilers here.  But since ISO
   C99 is out hopefully all maintained compilers will soon provide the data
   C99 is out hopefully all maintained compilers will soon provide the data
   types `float complex' and `double complex'.  */
   types `float complex' and `double complex'.  */
#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
# define _Complex __complex__
# define _Complex __complex__
#endif
#endif
 
 
#define complex         _Complex
#define complex         _Complex
 
 
/* Narrowest imaginary unit.  This depends on the floating-point
/* Narrowest imaginary unit.  This depends on the floating-point
   evaluation method.
   evaluation method.
   XXX This probably has to go into a gcc related file.  */
   XXX This probably has to go into a gcc related file.  */
#define _Complex_I      (__extension__ 1.0iF)
#define _Complex_I      (__extension__ 1.0iF)
 
 
/* Another more descriptive name is `I'.
/* Another more descriptive name is `I'.
   XXX Once we have the imaginary support switch this to _Imaginary_I.  */
   XXX Once we have the imaginary support switch this to _Imaginary_I.  */
#undef I
#undef I
#define I _Complex_I
#define I _Complex_I
 
 
/* The file <bits/cmathcalls.h> contains the prototypes for all the
/* The file <bits/cmathcalls.h> contains the prototypes for all the
   actual math functions.  These macros are used for those prototypes,
   actual math functions.  These macros are used for those prototypes,
   so we can easily declare each function as both `name' and `__name',
   so we can easily declare each function as both `name' and `__name',
   and can declare the float versions `namef' and `__namef'.  */
   and can declare the float versions `namef' and `__namef'.  */
 
 
#define __MATHCALL(function, args)      \
#define __MATHCALL(function, args)      \
  __MATHDECL (_Mdouble_complex_,function, args)
  __MATHDECL (_Mdouble_complex_,function, args)
#define __MATHDECL(type, function, args) \
#define __MATHDECL(type, function, args) \
  __MATHDECL_1(type, function, args); \
  __MATHDECL_1(type, function, args); \
  __MATHDECL_1(type, __CONCAT(__,function), args)
  __MATHDECL_1(type, __CONCAT(__,function), args)
#define __MATHDECL_1(type, function, args) \
#define __MATHDECL_1(type, function, args) \
  extern type __MATH_PRECNAME(function) args __THROW
  extern type __MATH_PRECNAME(function) args __THROW
 
 
#define _Mdouble_               double
#define _Mdouble_               double
#define __MATH_PRECNAME(name)   name
#define __MATH_PRECNAME(name)   name
#include <cmathcalls.h>
#include <cmathcalls.h>
#undef  _Mdouble_
#undef  _Mdouble_
#undef  __MATH_PRECNAME
#undef  __MATH_PRECNAME
 
 
/* Now the float versions.  */
/* Now the float versions.  */
#ifndef _Mfloat_
#ifndef _Mfloat_
# define _Mfloat_               float
# define _Mfloat_               float
#endif
#endif
#define _Mdouble_               _Mfloat_
#define _Mdouble_               _Mfloat_
#ifdef __STDC__
#ifdef __STDC__
# define __MATH_PRECNAME(name)  name##f
# define __MATH_PRECNAME(name)  name##f
#else
#else
# define __MATH_PRECNAME(name)  name/**/f
# define __MATH_PRECNAME(name)  name/**/f
#endif
#endif
#include <cmathcalls.h>
#include <cmathcalls.h>
#undef  _Mdouble_
#undef  _Mdouble_
#undef  __MATH_PRECNAME
#undef  __MATH_PRECNAME
 
 
#if 0
#if 0
/* And the long double versions.  It is non-critical to define them
/* And the long double versions.  It is non-critical to define them
   here unconditionally since `long double' is required in ISO C99.  */
   here unconditionally since `long double' is required in ISO C99.  */
#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
# ifndef _Mlong_double_
# ifndef _Mlong_double_
#  define _Mlong_double_        long double
#  define _Mlong_double_        long double
# endif
# endif
# define _Mdouble_              _Mlong_double_
# define _Mdouble_              _Mlong_double_
# ifdef __STDC__
# ifdef __STDC__
#  define __MATH_PRECNAME(name) name##l
#  define __MATH_PRECNAME(name) name##l
# else
# else
#  define __MATH_PRECNAME(name) name/**/l
#  define __MATH_PRECNAME(name) name/**/l
# endif
# endif
# include <cmathcalls.h>
# include <cmathcalls.h>
#endif
#endif
#endif
#endif
#undef  _Mdouble_
#undef  _Mdouble_
#undef  __MATH_PRECNAME
#undef  __MATH_PRECNAME
#undef  __MATHDECL_1
#undef  __MATHDECL_1
#undef  __MATHDECL
#undef  __MATHDECL
#undef  __MATHCALL
#undef  __MATHCALL
 
 
__END_DECLS
__END_DECLS
 
 
#endif /* complex.h */
#endif /* complex.h */
 
 

powered by: WebSVN 2.1.0

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