diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 30f3d37ca..930e3f6b0 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2012-05-03 Greta Yorsh + + * testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro. + (MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set. + (MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise. + 2012-03-29 Corinna Vinschen * libc/locale/locale.c (__mb_cur_max): On Cygwin, align default value diff --git a/newlib/testsuite/newlib.string/strcmp-1.c b/newlib/testsuite/newlib.string/strcmp-1.c index 81f4a1f86..a5258999f 100644 --- a/newlib/testsuite/newlib.string/strcmp-1.c +++ b/newlib/testsuite/newlib.string/strcmp-1.c @@ -31,6 +31,9 @@ #include #include +/* The macro LONG_TEST controls whether a short or a more comprehensive test + of strcmp should be performed. */ +#ifdef LONG_TEST #ifndef BUFF_SIZE #define BUFF_SIZE 1024 #endif @@ -54,11 +57,35 @@ #ifndef MAX_ZEROS #define MAX_ZEROS 8 #endif +#else /* not defined LONG_TEST */ +#ifndef BUFF_SIZE +#define BUFF_SIZE 1024 +#endif + +#ifndef MAX_BLOCK_SIZE +#define MAX_BLOCK_SIZE 64 +#endif + +#ifndef MAX_OFFSET +#define MAX_OFFSET 3 +#endif + +#ifndef MAX_DIFF +#define MAX_DIFF 4 +#endif + +#ifndef MAX_LEN +#define MAX_LEN 4 +#endif + +#ifndef MAX_ZEROS +#define MAX_ZEROS 4 +#endif +#endif /* not defined LONG_TEST */ #if (MAX_OFFSET >= 26) #error "MAX_OFFSET >= 26" #endif - #if (MAX_OFFSET + MAX_BLOCK_SIZE + MAX_DIFF + MAX_LEN + MAX_ZEROS >= BUFF_SIZE) #error "Buffer overrun: MAX_OFFSET + MAX_BLOCK_SIZE + MAX_DIFF + MAX_LEN + MAX_ZEROS >= BUFF_SIZE." #endif