[patch] open_memstream 16bit portability issue.

Ralf Corsepius ralf.corsepius@rtems.org
Tue Jan 4 00:31:00 GMT 2011


Hi,

another issue:

internal_open_memstream_r() in libc/stdio/open_memstream.c presumes 
size_t to accept 64*1024 (0x10000).

This is not applicable on 16-bit targets (sizeof(size_t) == 2). GCC 
warns about this.

The patch works around this issue by disabling the code in question on 
targets whose SIZE_MAX is less than 64*1024.

Ralf


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib-libc-open_memstream.diff
URL: <http://sourceware.org/pipermail/newlib/attachments/20110104/ec65f402/attachment.ksh>


More information about the Newlib mailing list