* libc/include/stdint.h (SIZE_MIN): Remove.

(SIZE_MAX): Define.
	* testsuite/newlib.stdlib/stdlib.exp: New.
	* testsuite/newlib.stdlib/size_max.c: Likewise.
This commit is contained in:
Mark Mitchell
2008-05-02 14:52:56 +00:00
parent cce741c409
commit df93e6f193
4 changed files with 36 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
int main () {
size_t s;
s = SIZE_MAX;
/* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
too big. */
if (s != SIZE_MAX)
abort ();
/* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough. */
if (++s != 0)
abort ();
return 0;
}

View File

@@ -0,0 +1,10 @@
# Copyright (C) 2008 by CodeSourcery, Inc. All rights reserved.
#
# Permission to use, copy, modify, and distribute this software
# is freely granted, provided that this notice is preserved.
load_lib passfail.exp
set exclude_list [list "atexit.c"]
newlib_pass_fail_all -x $exclude_list