Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-04-04 23:49:31 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2016-04-05 16:49:44 +0300
commitcd84d1c2d06ad0a30f3aebb8ff86727df67ba0da (patch)
treeaa9a1f9d83b8963439df7a16d05c10b82dced7cf /newlib/libm
parent8d67708a08082df4b077ee35dcfd4947c0a5b1f3 (diff)
math: update isinf/isnan function comments after move to math.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libm')
-rw-r--r--newlib/libm/common/s_isinf.c5
-rw-r--r--newlib/libm/common/s_isnan.c14
-rw-r--r--newlib/libm/common/s_isnand.c8
-rw-r--r--newlib/libm/common/sf_isinf.c5
-rw-r--r--newlib/libm/common/sf_isnan.c2
-rw-r--r--newlib/libm/machine/spu/sf_isinf.c2
6 files changed, 18 insertions, 18 deletions
diff --git a/newlib/libm/common/s_isinf.c b/newlib/libm/common/s_isinf.c
index db8e8f82b..f22acb7f1 100644
--- a/newlib/libm/common/s_isinf.c
+++ b/newlib/libm/common/s_isinf.c
@@ -4,9 +4,8 @@
*
* isinf is a <math.h> macro in the C99 standard. It was previously
* implemented as a function by newlib and is declared as such in
- * <ieeefp.h>. Newlib supplies it here as a function if the user
- * chooses to use <ieeefp.h> or needs to link older code compiled with the
- * previous <math.h> declaration.
+ * <math.h>. Newlib supplies it here as a function if the user
+ * chooses to use it instead of the C99 macro.
*/
#include "fdlibm.h"
diff --git a/newlib/libm/common/s_isnan.c b/newlib/libm/common/s_isnan.c
index 3ce5aa669..64deacd66 100644
--- a/newlib/libm/common/s_isnan.c
+++ b/newlib/libm/common/s_isnan.c
@@ -53,7 +53,7 @@ ANSI_SYNOPSIS
int isnormal(real-floating <[x]>);
[Archaic SUSv2 functions:]
- #include <ieeefp.h>
+ #include <math.h>
int isnan(double <[arg]>);
int isinf(double <[arg]>);
int finite(double <[arg]>);
@@ -142,7 +142,7 @@ o-
and <<isinf>> are macros that operate on multiple types of
floating-point. The SUSv2 standard declares <<isnan>> as
a function taking double. Newlib has decided to declare
- them both as macros in math.h and as functions in ieeefp.h to
+ them both as functions and as macros in math.h to
maintain backward compatibility.
RETURNS
@@ -154,9 +154,11 @@ The isnan macro returns nonzero if <[x]> is an NaN, else 0.@*
The isnormal macro returns nonzero if <[x]> has a normal value, else 0.
PORTABILITY
-math.h macros are C99, POSIX.
+math.h macros are C99, POSIX.1-2001.
-ieeefp.h funtions are outdated and should be avoided.
+The functions originate from BSD; isnan was listed in the X/Open
+Portability Guide and Single Unix Specification, but was dropped when
+the macro was standardized in POSIX.1-2001.
QUICKREF
isnan - pure
@@ -179,8 +181,8 @@ QUICKREF
* The C99 standard dictates that isnan is a macro taking
* multiple floating-point types while the SUSv2 standard
* notes it is a function taking a double argument. Newlib
- * has chosen to implement it as a macro in <math.h> and
- * declare it as a function in <ieeefp.h>.
+ * has chosen to declare it both as a function and as a macro in
+ * <math.h> for compatibility.
*/
#include "fdlibm.h"
diff --git a/newlib/libm/common/s_isnand.c b/newlib/libm/common/s_isnand.c
index 75538d907..0ac8c5938 100644
--- a/newlib/libm/common/s_isnand.c
+++ b/newlib/libm/common/s_isnand.c
@@ -28,7 +28,7 @@ INDEX
finitef
ANSI_SYNOPSIS
- #include <ieeefp.h>
+ #include <math.h>
int isnan(double <[arg]>);
int isinf(double <[arg]>);
int finite(double <[arg]>);
@@ -37,7 +37,7 @@ ANSI_SYNOPSIS
int finitef(float <[arg]>);
TRAD_SYNOPSIS
- #include <ieeefp.h>
+ #include <math.h>
int isnan(<[arg]>)
double <[arg]>;
int isinf(<[arg]>)
@@ -77,8 +77,8 @@ DESCRIPTION
Note that by the C99 standard, <<isnan>> and <<isinf>> are macros
taking any type of floating-point and are declared in
- <<math.h>>. Newlib has chosen to declare these as macros in
- <<math.h>> and as functions in <<ieeefp.h>>.
+ <<math.h>>. Newlib has chosen to declare these both as functions
+ and as macros in <<math.h>>.
The <<isnanf>>, <<isinff>> and <<finitef>> functions perform the same
operations as their <<isnan>>, <<isinf>> and <<finite>>
diff --git a/newlib/libm/common/sf_isinf.c b/newlib/libm/common/sf_isinf.c
index 6595a681c..5b57a346f 100644
--- a/newlib/libm/common/sf_isinf.c
+++ b/newlib/libm/common/sf_isinf.c
@@ -3,9 +3,8 @@
*
* isinf is a <math.h> macro in the C99 standard. It was previously
* implemented as isinf and isinff functions by newlib and are still declared
- * as such in <ieeefp.h>. Newlib supplies it here as a function if the user
- * chooses to use <ieeefp.h> or needs to link older code compiled with the
- * previous <math.h> declaration.
+ * as such in <math.h>. Newlib supplies it here as a function if the user
+ * chooses to use it instead of the C99 macro.
*/
#include "fdlibm.h"
diff --git a/newlib/libm/common/sf_isnan.c b/newlib/libm/common/sf_isnan.c
index ddda6b331..9c813fc24 100644
--- a/newlib/libm/common/sf_isnan.c
+++ b/newlib/libm/common/sf_isnan.c
@@ -15,7 +15,7 @@
/*
* isnanf(x) returns 1 is x is nan, else 0;
*
- * isnanf is an extension declared in <ieeefp.h>.
+ * isnanf is an extension declared in <math.h>.
*/
#include "fdlibm.h"
diff --git a/newlib/libm/machine/spu/sf_isinf.c b/newlib/libm/machine/spu/sf_isinf.c
index 3c5f8d81f..6460ec13d 100644
--- a/newlib/libm/machine/spu/sf_isinf.c
+++ b/newlib/libm/machine/spu/sf_isinf.c
@@ -34,7 +34,7 @@
/*
* On the SPU isinff(x) always returns 0.
*
- * isinff is an extension declared in <ieeefp.h>.
+ * isinff is an extension declared in <math.h>.
*/
int
isinff (float x)