cURL / Mailing Lists / curl-library / Single Mail

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 28 Jun 2007 12:39:02 +0200 (CEST)

On Thu, 28 Jun 2007, James Housley wrote:

>> fdopen() takes two arguments. What's the need for variable arguments?
>
> That does make it easy, the attached patch does it.

Yeps, that looks fine.

> A couple of questions, it looks like starting at some point widows wants
> _fdopen() instead, what a pain in the neck. So there would need to be some
> configure magic of some type, but that is beyond me since I don't use
> windows.

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.

> Next, I noticed in memdebug.h there is "#undef fopen" before it is defined
> to be "curl_fopen", but the same is not done for fclose.

I think that's just because someone somewhere once needed the undef for fopen
to make things work, while nobody has yet needed it for fclose... I guess it
should be #undefed there too for completeness.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-06-28