Mercurial > hg > octave-kai > gnulib-hg
diff lib/math.in.h @ 15875:7eede30e6658
New module 'cosf'.
* lib/math.in.h (cosf): New declaration.
* lib/cosf.c: New file.
* m4/cosf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether cosf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_COSF, HAVE_COSF.
* modules/math (Makefile.am): Substitute GNULIB_COSF, HAVE_COSF.
* modules/cosf: New file.
* tests/test-math-c++.cc: Check the declaration of cosf.
* doc/posix-functions/cosf.texi: Mention the new module.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 08 Oct 2011 23:07:36 +0200 |
parents | 83e1d08997e4 |
children | c0c190f3cccb |
line wrap: on
line diff
--- a/lib/math.in.h +++ b/lib/math.in.h @@ -213,6 +213,21 @@ #endif +#if @GNULIB_COSF@ +# if !@HAVE_COSF@ +# undef cosf +_GL_FUNCDECL_SYS (cosf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (cosf, float, (float x)); +_GL_CXXALIASWARN (cosf); +#elif defined GNULIB_POSIXCHECK +# undef cosf +# if HAVE_RAW_DECL_COSF +_GL_WARN_ON_USE (cosf, "cosf is unportable - " + "use gnulib module cosf for portability"); +# endif +#endif + #if @GNULIB_COSL@ # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ _GL_FUNCDECL_SYS (cosl, long double, (long double x));