curl-library
Re: jehousley: curl/lib easy.c, 1.103, 1.104 file.c, 1.87, 1.88 ssh.c, 1.57, 1.58 url.c, 1.621, 1.622 urldata.h, 1.333, 1.334
Date: Sat, 30 Jun 2007 09:39:58 -0400
Daniel Stenberg wrote:
> Well, the pain is actually even further than "just" that. The libc
> functions aren't provided by the OS but by the compiler(s) so fdopen()
> or _fdopen() is up to the compiler vendor to play with.
>
> But for this case, I figure we can ask windows devs in the audience to
> provide a fix for lib/config-win32.h or similar, that redefines fdopen
> to _fdopen for the compiler setups that need that.
I'm not a "windows dev" but one thing I learned while porting my Unix
app to Windows is that there's a library "oldnames.lib" which consists
of stubs to deal with this. Thus one option is to continue using
"fdopen" et al and link with oldnames.lib. You could even arrange to
make this the default for client apps by embedding the appropriate
pragma into the curl headers (yes, Windows allows a header file to
specify libraries to link with) though it's a matter of taste whether
that's elegant or sick.
MB
Received on 2007-06-30