This is the mail archive of the mailing list for the GCC 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: [gfortran] PR 19182

On Wed, Jan 05, 2005 at 01:37:38AM +0100, Tobias Schlüter wrote:
> Andrew Pinski wrote:
> > Is setvbuf always available on all the targets which we support as
> > the host/build?  Yes it is included in C89 but we don't require
> > a C89 host library, only a C89 compiler to bootstrap with.
> setvbuf is called in toplev.c:
>   setvbuf (asm_out_file, xmalloc (IO_BUFFER_SIZE),
> #endif
> Now, IO_BUFFER_SIZE is defined nowhere, but some googling revealed that when
> it was still defined, it was defined without further conditionals, i.e. like
> so (from
> Index: config/i386/xm-sco.h
> --- config/i386/xm-sco.h	Fri Mar 16 13:37:18 2001
> +++ config/i386/xm-sco.h	Tue May  5 13:32:27 1998
> @@ -1,5 +0,0 @@
> -/* Configuration for GCC for Intel i386 running SCO.  */
> -
> -/* Big buffers improve performance.  */
> -
> -#define IO_BUFFER_SIZE (0x8000 - 1024)
> >From this I conclude that calling setvbuf is safe.  I had actually refrained
> from making that call "setlinebuf (stderr);" as that is less portable
> according to the glibc docs.

That's not a good assumption - xm files are for particular host
systems, so this only asserts that setvbuf is available on i386/SCO.

You may need to autoconf for this.

Daniel Jacobowitz

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