2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
* libc/stdio/open_memstream.c (internal_open_memstream_r): Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024.
This commit is contained in:
parent
f559c264a9
commit
c0e3c29150
|
@ -1,3 +1,8 @@
|
|||
2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libc/stdio/open_memstream.c (internal_open_memstream_r):
|
||||
Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024.
|
||||
|
||||
2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libc/xdr/xdr.c: Fix typos in #errors.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue