From c0e3c29150f2148f11832d11fd929e5f44b2960b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 5 Jan 2011 17:38:42 +0000 Subject: 2011-01-05 Ralf Corsepius * libc/stdio/open_memstream.c (internal_open_memstream_r): Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024. --- newlib/libc/stdio/open_memstream.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'newlib/libc/stdio/open_memstream.c') diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c index 2066822cd..a53bdef2f 100644 --- a/newlib/libc/stdio/open_memstream.c +++ b/newlib/libc/stdio/open_memstream.c @@ -330,8 +330,10 @@ _DEFUN(internal_open_memstream_r, (ptr, buf, size, wide), c->max *= sizeof(wchar_t); if (c->max < 64) c->max = 64; +#if (SIZE_MAX >= 64 * 1024) else if (c->max > 64 * 1024) c->max = 64 * 1024; +#endif *size = 0; *buf = _malloc_r (ptr, c->max); if (!*buf) -- cgit v1.2.3