setvbuf()

Ross Oliver rosso at sco.COM
Thu Feb 23 07:34:54 AEST 1989


In article <20422 at agate.BERKELEY.EDU> ked at garnet.berkeley.edu (Earl H. Kinmonth) writes:
>setvbuf() for SCO Xenix has a different calling sequence from the
>setvbuf() in BSD UNIX and in the C libraries for Turbo C and other
>Misery Dos compilers.
>
>The common sequence is
>
>setvbuf(stream,buffer,type,size)
>
>The SCO sequence is
>
>setvbuf(stream,type,buffer,size)
>
>Since there is no function prototype in <stdio.h>, the parameter
>mismatch will not show up unless you check the return value. (I
>wasn't.) Even if you do, its not very informative.


This was discovered and corrected in the 2.3 release
of the Development System.  It was actually inherited
from Microsoft.

Backward compatibile objects exist for programs that can't
be recompiled and still expect the old sequence.  To use
these, you must use the -compat flag.  Otherwise, source
needs to be fixed to use the new libraries.

The prototypes for all library and system calls, including
the corrected setvbuf(), have been added to the #include
files in 2.3 Development System.

Ross Oliver
Technical Support
The Santa Cruz Operation, Inc.



More information about the Comp.unix.xenix mailing list