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