X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-vasnprintf-posix.c;h=bf125480ae58a86e97d0be59c86ce55e2406a5e8;hb=2c64312ecca19a60629cb929c1ae759109c772b5;hp=aa537fbd74dd4e6da5bb28064db1126578eaf7be;hpb=ea0f5bf6444c14f97c069b5da723781ecb8a84aa;p=gnulib.git diff --git a/tests/test-vasnprintf-posix.c b/tests/test-vasnprintf-posix.c index aa537fbd7..bf125480a 100644 --- a/tests/test-vasnprintf-posix.c +++ b/tests/test-vasnprintf-posix.c @@ -57,8 +57,14 @@ have_minus_zero () double zerod = 0.0; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. - So we use minus_zerol instead. */ + So we use minus_zerol instead. + Note that the expression -LDBL_MIN * LDBL_MIN does not work on other + platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */ +#if defined __hpux || defined __sgi long double minus_zerol = -LDBL_MIN * LDBL_MIN; +#else +long double minus_zerol = -0.0L; +#endif /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */