curl-library
RE: Help on usinig Curl on vxwrks
Date: Thu, 4 Jun 2009 17:34:34 +0300
> Could you verify if the
> prototype in sockLib.h actually uses a pointer to timeval struct or a
> pointer to void?
It uses a pointer to timeval struct.
> If it actually is a pointer to a timeval struct, isn't it enough to
> include sockLib.h to get the timeval struct definition, or should
> other header be included before sockLib.h to be able to use the
> connectWithTimeout() function?
Excellent guess! include sockLib.h is enough!
So you can remove
/* VxWorks 6.3 has no sys/time.h. It has sys/times.h instead.
Since libcurl doesn't use sys/times.h at all, we include here the
<net/if.h>
in order to provide the libcurl with definition of the struct
timeval.
The <netinet/in.h> is needed to provide the if.h with proper
configuration. */
//#include <netinet/in.h>
//#include <net/if.h>
from the patch or use the attached fixed file.
> Could you verify if both sys/time.h and time.h can be included in a
> program without compilation errors?
"#include sys/time.h" does cause compilation error,
"#include time.h" passes OK
> Could you verify what actually happens with these two header files on
> VxWorks 5.X?
I can't compile for 5.X (have no license), but the 5.5 and 5.5.1
distributions don't contain "sys" folder at all
And do contain "time.h".
> Isn't it enough to include both time.h and sys/time.h on all VxWorks
> versions to get the timeval struct definition?
As you figured out already, "sys/time.h" causes problems.
"time.h" should work I think. But it is not needed, since the necessary
for socket sockLib.h brings the correct time.h.
Thanks!
- application/octet-stream attachment: setup-vxworks.h