diff options
Diffstat (limited to 'gnulib-tests/test-signbit.c')
-rw-r--r-- | gnulib-tests/test-signbit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnulib-tests/test-signbit.c b/gnulib-tests/test-signbit.c index e8ea097c..584bf4f9 100644 --- a/gnulib-tests/test-signbit.c +++ b/gnulib-tests/test-signbit.c @@ -1,5 +1,5 @@ /* Test of signbit() substitute. - Copyright (C) 2007-2013 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -151,6 +151,16 @@ test_signbitl () #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; + +#if defined __powerpc__ && LDBL_MANT_DIG == 106 + /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are + represented as the corresponding 64-bit IEEE values in the first double; + the second is ignored. Manipulate only the first double. */ + #undef NWORDS + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +#endif + memory_long_double m; m.value = zerol / zerol; # if LDBL_EXPBIT0_BIT > 0 |