diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-04-05 17:45:04 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-04-05 17:45:04 +0200 |
commit | 36d437d4861f74f8df506b737d079bb62c794d82 (patch) | |
tree | 1a8cbebfdcf29c87c9cf8e874cec1c9cb0d6570f /gl/tests | |
parent | baa36085ac09f0ff7e0542ebba3b0986accf81c3 (diff) | |
download | gnutls-36d437d4861f74f8df506b737d079bb62c794d82.tar.gz |
updated gnulib
Diffstat (limited to 'gl/tests')
-rw-r--r-- | gl/tests/strerror_r.c | 3 | ||||
-rw-r--r-- | gl/tests/test-float.c | 5 | ||||
-rw-r--r-- | gl/tests/test-math.c | 18 |
3 files changed, 21 insertions, 5 deletions
diff --git a/gl/tests/strerror_r.c b/gl/tests/strerror_r.c index be76b0d37a..76f6fc64d2 100644 --- a/gl/tests/strerror_r.c +++ b/gl/tests/strerror_r.c @@ -34,6 +34,7 @@ #if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */ # define USE_XPG_STRERROR_R 1 +extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen); #elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) @@ -161,8 +162,6 @@ strerror_r (int errnum, char *buf, size_t buflen) #if USE_XPG_STRERROR_R { - extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen); - ret = __xpg_strerror_r (errnum, buf, buflen); if (ret < 0) ret = errno; diff --git a/gl/tests/test-float.c b/gl/tests/test-float.c index f3691be5e1..18da40b5e9 100644 --- a/gl/tests/test-float.c +++ b/gl/tests/test-float.c @@ -23,11 +23,11 @@ #include "fpucw.h" #include "macros.h" +#if 0 + /* Check that FLT_RADIX is a constant expression. */ int a[] = { FLT_RADIX }; -#if FLT_RADIX == 2 - /* Return 2^n. */ static float pow2f (int n) @@ -377,7 +377,6 @@ main () int main () { - fprintf (stderr, "Skipping test: FLT_RADIX is not 2.\n"); return 77; } diff --git a/gl/tests/test-math.c b/gl/tests/test-math.c index 25be63a54d..1375e76ad4 100644 --- a/gl/tests/test-math.c +++ b/gl/tests/test-math.c @@ -40,6 +40,18 @@ choke me choke me #endif +#ifndef FP_ILOGB0 +# error FP_ILOGB0 should be defined +choke me +#endif + +#ifndef FP_ILOGBNAN +# error FP_ILOGBNAN should be defined +choke me +#endif + +#include <limits.h> + #include "macros.h" #if 0 @@ -82,5 +94,11 @@ main (void) ASSERT (numeric_equall (HUGE_VALL, HUGE_VALL + HUGE_VALL)); + /* Check the value of FP_ILOGB0. */ + ASSERT (FP_ILOGB0 == INT_MIN || FP_ILOGB0 == - INT_MAX); + + /* Check the value of FP_ILOGBNAN. */ + ASSERT (FP_ILOGBNAN == INT_MIN || FP_ILOGBNAN == INT_MAX); + return 0; } |