=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/include/math.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- src/include/math.h 2005/11/17 20:07:40 1.10 +++ src/include/math.h 2005/12/13 00:35:22 1.11 @@ -1,4 +1,4 @@ -/* $OpenBSD: math.h,v 1.10 2005/11/17 20:07:40 otto Exp $ */ +/* $OpenBSD: math.h,v 1.11 2005/12/13 00:35:22 millert Exp $ */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -17,6 +17,8 @@ #ifndef _MATH_H_ #define _MATH_H_ +#include + /* * ANSI/POSIX */ @@ -36,7 +38,7 @@ /* * XOPEN/SVID */ -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#if __BSD_VISIBLE || __XPG_VISIBLE #define M_E 2.7182818284590452354 /* e */ #define M_LOG2E 1.4426950408889634074 /* log 2e */ #define M_LOG10E 0.43429448190325182765 /* log 10e */ @@ -58,8 +60,9 @@ #endif extern int signgam; +#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ -#if !defined(_XOPEN_SOURCE) +#if __BSD_VISIBLE enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix}; #define _LIB_VERSION_TYPE enum fdversion @@ -105,11 +108,8 @@ #define TLOSS 5 #define PLOSS 6 -#endif /* !_XOPEN_SOURCE */ -#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ - -#include __BEGIN_DECLS /* * ANSI/POSIX @@ -141,7 +141,7 @@ extern double floor(double); extern double fmod(double, double); -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#if __BSD_VISIBLE || __XPG_VISIBLE extern double erf(double); extern double erfc(double); extern double gamma(double); @@ -157,7 +157,7 @@ extern double y1(double); extern double yn(int, double); -#if !defined(_XOPEN_SOURCE) +#if __BSD_VISIBLE || __XPG_VISIBLE >= 500 extern double acosh(double); extern double asinh(double); extern double atanh(double); @@ -200,10 +200,10 @@ * Reentrant version of gamma & lgamma; passes signgam back by reference * as the second argument; user must allocate space for signgam. */ -#ifdef _REENTRANT +#if __BSD_VISIBLE || defined(_REENTRANT) extern double gamma_r(double, int *); extern double lgamma_r(double, int *); -#endif /* _REENTRANT */ +#endif /* __BSD_VISIBLE || _REENTRANT */ /* float versions of ANSI/POSIX functions */ @@ -289,13 +289,13 @@ * signgam back by reference as the second argument; user must * allocate space for signgam. */ -#ifdef _REENTRANT +#if __BSD_VISIBLE || defined(_REENTRANT) extern float gammaf_r(float, int *); extern float lgammaf_r(float, int *); -#endif /* _REENTRANT */ +#endif /* __BSD_VISIBLE || _REENTRANT */ -#endif /* !_XOPEN_SOURCE */ -#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 500 */ +#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ __END_DECLS #endif /* _MATH_H_ */