math: add portability warnings for classification macros
authorEric Blake <ebb9@byu.net>
Thu, 31 Dec 2009 20:48:15 +0000 (13:48 -0700)
committerEric Blake <ebb9@byu.net>
Mon, 11 Jan 2010 13:52:25 +0000 (06:52 -0700)
commit428092c7c2f6bfadebf86ce82ede54dee303cb67
tree5cd0a2487d8a69914cd126b15370461d0449cd15
parent718991da5f5026e1a8ce2efcca58359d9b67b2f5
math: add portability warnings for classification macros

For interfaces which are defined to exist only as macros, implement
the proper magic needed to warn if the corresponding gnulib module was
not in use.  This solution avoids promoting arguments unnecessarily,
to allow reuse in case gnulib ever implements fpclassify, since
fpclassify(1e-40f) is different than fpclassify(1e-40).

* modules/math (Depends-on): Add warn-on-use.
(Makefile.am): Provide new substitutions.
* m4/math_h.m4 (gl_MATH_H): Require inline.
* lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL)
(_GL_WARN_REAL_FLOATING_IMPL): New helper macros.
(isfinite, isinf, isnan, signbit) [GNULIB_POSIXCHECK]: Use them to
implement warnings.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/math.in.h
m4/math_h.m4
modules/math