cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: configure warning

From: Mark Wattier <mark.wattier_at_gmail.com>
Date: Tue, 7 Nov 2006 09:10:47 -0800

I did compile a trivial program that defines a variable of type
fd_set. This compiled without errors:

#include <sys/time.h>

int main()

{

fd_set *readfds;

}

Since the error I get says :Parse error before "fd_set" , and I tried
changing the include in curl.h to use sys/time.h, and that made no
difference, could it be something on the previous line? Here is the
chunk of code, from multi.h. I am looking at this using cscope, but I
have not found anything wrong yet.

CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
                                       fd_set *read_fd_set,
                                       fd_set *write_fd_set,
                                       fd_set *exc_fd_set,
                                       int *max_fd);

On 11/7/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 6 Nov 2006, Mark Wattier wrote:
>
> > multi.h includes curl.h, which in turn includes <time.h> but not
> > <sys/time.h> , That would seem to be in error. I don't know how 64-bit would
> > affect this.
> >
> > Should I just change curl.h to include <sys/time.h> ? I am generally
> > reluctant to do this, but I tried it, and it still does not work.
>
> Can you compile a simple stand-alone test program that uses fd_set ? If so,
> what headers do you include to get that to work/compile?
>
> > I suppose that if _FD_SET had already been defined, that would cause this,
> > but I don't yet see how that would get defined. It seems to be the usual way
> > of making things only get defined once.
>
> I can't find anything within (lib)curl that defines it, so it would only be
> done by your system headers and one would assume that they do that
> correctly...
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2006-11-07