[ECOS] fopen/fclose
Jonathan Larmour
jlarmour@redhat.com
Wed Apr 3 19:34:00 GMT 2002
Jurica Baricevic wrote:
>
> Here is the patch that fixed my problem. I hope that it can be safely
> applied to the eCos CVS.
Yep. I've included it.
Jifl
> ====================================================================
>
> --- packages/language/c/libc/stdio/current/src/common/fclose.cxx Fri Aug 25
> 20:33:40 2000
> +++ packages/language/c/libc/stdio/current/src/common/fclose.cxx Mon Mar 25
> 14:53:18 2002
> @@ -96,12 +96,16 @@ fclose( FILE *stream )
> return EOF;
> }
>
> +#ifdef CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
> // FIXME: should use delete?
> // Explicitly call destructor - this flushes the output too
> real_stream->~Cyg_StdioStream();
>
> // and free it
> free(real_stream);
> +#else
> + delete real_stream;
> +#endif // CYGFUN_INFRA_EMPTY_DELETE_FUNCTIONS
>
> // and mark the stream available for use
> Cyg_libc_stdio_files::set_file_stream(i, NULL);
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list