This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: disabling CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF breaks sprintf()


On Mon, Apr 11, 2005 at 12:48:23PM +0200, Neundorf, Alexander wrote:
> Hi,
> 
> if I disable both CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF and CYGSEM_LIBC_STDIO_SETVBUF_MALLOC it breaks sprintf(). Probably this is not surprisingly for people who know the code.
> sprintf() creates a Cyg_StdioStream using the user-supplied buffer for io_buf. But if CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF is disabled, it is not possible to set a different than the default static buffer for the stream, so this buffer isn't used and during runtime the application will break somewhere.
> I'd suggest to insert an assert e.g. in stream.cxx:

An assert seems like a good idea, plus a comment saying it will fire
when sprintf is used with both CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF and
CYGSEM_LIBC_STDIO_SETVBUF_MALLO disabled.

Please could you provide me a patch.

        Thanks        

                Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]