cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ares: fd_set on AIX

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 25 Feb 2004 08:20:38 +0100 (CET)

On Mon, 23 Feb 2004, Daniel Stenberg wrote:

> > On the other hand, the latest POSIX demands that one should always include
> > <sys/select.h> for anything select() (thus also for fd_set), so should it
> > really be necessary with wrappers for e.g. sys/types.h and sys/select.h? Or
> > are there some curl-supported platforms without these files?
>
> I'm not sure, but I prefer to use the #ifdefs just in case.

(replying to myself)

Aaaah. I'm silly!

'ares.h' is the main public header file for ares, we can't have that use
#ifdefs that are created by configure, since software including it may not
have those defines!

I did a quick check in the curl headers and I noticed how we have solved it in
curl/multi.h and I decided to use the same in ares.h:

#ifdef _AIX
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
   libc5-based Linux systems. Only include it on system that are known to
   require it! */
#include <sys/select.h>
#endif

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-25