long double vs. double

2011-10-09 Thread Bruno Haible
On MSVC 9, some tests fail to compile because they assume that 'long double' has an 80-bit representation with a 64-bit mantissa. But on this platform - and, it turns out, also on Linux/HPPA, Minix, AIX - 'long double' and 'double' have the same size and same representation. 2011-10-09 Bruno Hai

Re: excess precision for 'float'

2011-10-09 Thread Bastien ROUCARIES
On Sun, Oct 9, 2011 at 12:31 AM, Bruno Haible wrote: > It is well-known that 'double' computation results on x86 processors can > carry excess precision. Namely, if the value is stored in a floating-point > register (80 bits total, 64 bits mantissa) without passing through a > memory store, it can

isinf on AIX 5.1

2011-10-09 Thread Bruno Haible
The isinf test fails to compile on AIX 5.1: With xlc: "test-isinf.c", line 26.3: 1506-205 (S) #error missing declaration With gcc: test-isinf.c:26:3: error: #error missing declaration Apparently, on this platform, isinf is defined as a function but not declared as a macro. This fixes it. 2

copysign on MSVC

2011-10-09 Thread Bruno Haible
MSVC 9 does not have the copysign() function. Here's the workaround. 2011-10-09 Bruno Haible copysign: Provide replacement. * lib/math.in.h (copysign): New declaration. * lib/copysign.c: New file. * m4/copysign.m4: New file. * m4/math_h.m4 (gl_MATH_H):

add missing ordering constraints

2011-10-09 Thread Bruno Haible
When a variable HAVE_FOO is initialized to 1 and set to 0 in a different .m4 file, we have to ensure that the assignment to 1 is done before the assignment to 0, not afterwards. Checking the results of $ grep -n 'HAVE_.*=0' \ $(for f in $(grep -l 'HAVE_.*=0' *.m4) ; do \ if fgrep -l 'DEFAU

Re: copysign on MSVC

2011-10-09 Thread Bruno Haible
> 2011-10-09 Bruno Haible > > copysign: Provide replacement. While at it, I also added modules for 'copysignf' and 'copysignl'. 2011-10-09 Bruno Haible New module 'copysignf'. * lib/math.in.h (copysignf): New declaration. * lib/copysignf.c: New file.

rint on MSVC

2011-10-09 Thread Bruno Haible
On MSVC 9, the rint() function does not exist. This patch provides the replacement. 2011-10-09 Bruno Haible rint: Support for MSVC. * lib/math.in.h (rint): New declaration. * lib/rint.c: New file. * m4/rint.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test

new modules 'rintf' and 'rintl'

2011-10-09 Thread Bruno Haible
> * lib/rint.c: New file. While at it, I also added 'rintf' and 'rintl' modules. They use the same code as the 'rint' module. = lib/rintf.c = /* Round according to the current rounding mode. Copyright (C) 2011 Free Software

Re: new snapshot available: coreutils-8.13.29-43a9

2011-10-09 Thread Jim Meyering
Jim Meyering wrote: > Bruno Haible wrote: >> On MacOS X 10.5, the following gnulib tests fail to link: > ... >> This is apparently due to the recent implementation change of getcwd(). >> This patch should fix it: >> >> 2011-10-08 Bruno Haible >> >> Tests: Avoid link failures w.r.t. libintl

copysignl: simplify simple case

2011-10-09 Thread Bruno Haible
We know of 4 platforms where 'long double' is the same as 'double': Linux/HPPA, Minix, AIX, MSVC 9. On these platforms, there is no need to compile large pieces of code for 'long double' functions. A simple redirection to the function taking 'double's and returning a 'double' will do. This will sa

Re: copysignl: simplify simple case

2011-10-09 Thread Bruno Haible
> copysignl: Simplify for platforms where 'long double' == 'double'. Similarly for floorl ceill truncl roundl rintl Bruno -- In memoriam Oskar Schindler

test-renameat does not cleanup after itself

2011-10-09 Thread Tom G. Christensen
Hello, Running make distcheck on CentOS 5 dies with: ERROR: files left in build directory after distclean: ./gltests/test-renameat.too make[1]: *** [distcleancheck] Error 1 -tgc

Re: test-renameat does not cleanup after itself

2011-10-09 Thread Jim Meyering
Tom G. Christensen wrote: > Running make distcheck on CentOS 5 dies with: > ERROR: files left in build directory after distclean: > ./gltests/test-renameat.too > make[1]: *** [distcleancheck] Error 1 Thanks for the report. That's nearly identical to the one I fixed for linkat on Oct 1. Here's a fi