diff m4/trunc-ieee.m4 @ 13983:ace70389132d

New module 'trunc-ieee'. * modules/trunc-ieee: New file. * m4/trunc.m4 (gl_FUNC_TRUNC): If gl_FUNC_TRUNC_IEEE is also used, test whether trunc works according to ISO C 99 with IEC 60559. * m4/trunc-ieee.m4: New file. * lib/math.in.h (trunc): Replace if REPLACE_TRUNC is set. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNC. * modules/math (Makefile.am): Substitute REPLACE_TRUNC. * modules/trunc-ieee-tests: New file. * tests/test-trunc-ieee.c: New file, based on tests/test-truncf-ieee.c. * tests/test-trunc1.c (main): Remove signbit tests. * modules/trunc-tests (Depends-on): Remove 'signbit'. * doc/posix-functions/trunc.texi: Mention the new module.
author Bruno Haible <bruno@clisp.org>
date Tue, 21 Dec 2010 18:30:16 +0100
parents
children 97fc9a21a8fb
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/m4/trunc-ieee.m4
@@ -0,0 +1,15 @@
+# trunc-ieee.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro is in a separate file (not in trunc.m4 and not inlined in the
+dnl module description), so that gl_FUNC_TRUNC can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_TRUNC_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_trunc_required=ieee])
+  AC_REQUIRE([gl_FUNC_TRUNC])
+])