delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/16/01:44:57

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
X-Authentication-Warning: mercury.xraylith.wisc.edu: khan owned process doing -bs
Date: Thu, 15 Jul 1999 23:31:45 -0500 (CDT)
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>
To: farshad mahjoubi <farshadm AT nortelnetworks DOT com>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Link is breaking for setbuffer()
In-Reply-To: <3.0.32.19990715094319.00a7b820@pobox>
Message-ID: <Pine.LNX.3.96.990715232002.15663C-100000@mercury.xraylith.wisc.edu>
MIME-Version: 1.0

On Thu, 15 Jul 1999, farshad mahjoubi wrote:

> >HI
> >
> >I am trying to port  our Application to WinNT. My link is breaking with
> >this ERROR that complaines about function setbuffer().

For good reason -- it's non-standard and the runtime library does not
provide it.

> >
> >Setbuffer() is being called from a C Source code and I see that it is
> >been declared in stdio.h 

The prototype is a mistake/bug in the header. It's not implemented in 
the runtime library.

> >
> >Does anyone know which library in /cygnus/cygwin contains the setbbuffer()
> >
> >why the standard libraries I am linking (which
> >_should_ contain the setbuffer function) don't do so... ?

Because it's non-standard. Please at least look up the standard (ANSI
and POSIX) before suggesting why a standard library does not provide 
some function.

Here's a trivial implementation straight out of a Linux man page using
ANSI standard setvbuf:
  
  #define setbuffer(stream,buf,size) \
     setvbuf((stream),  (buf),  (buf)  ? _IOFBF : _IONBF, (size))

I'll send a patch to Cygwin team.

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019