curl-library
RE: Help on usinig Curl on vxwrks
Date: Mon, 25 May 2009 14:48:16 +0200 (CEST)
On Mon, 25 May 2009, Igor Novoseltsev wrote:
> You should adjust lib/config.h to features supported by VxWorks 6.2. You
> can try to use the attached file, that worked for me on VxWorks 6.3.
> Rename it to config.h and put it into lib folder.
I would suggest you instead call it config-vxworks.h to follow the tradition,
and then you adjust lib/setup.h to include that file depending on a suitable
vxworks pre-define. What is a suitable define to check for? I couldn't find
any definite answer "out there".
> Few minor fixes should be done in sources:
>
> 1. In the file the lib\file.c file:
>
> replace the
>
> fd = open(real_path, O_RDONLY);
>
> with the
>
> fd = open(real_path, O_RDONLY, conn->data->set.new_file_perms);
Permissions required for open()ing a read-only file? What on earth does that
mean? And even so, I would suggest an #ifdef there so that we can get the
change back into the mainline.
> 2. In the file the lib\strerror.c file:
>
> replace the
>
> char *msg = strerror_r(err, buffer, sizeof(buffer));
>
> with the
>
> char *msg = strerror_r(err, buffer);
Here too. And here I would suggest we add an #ifdef for HAVE_STRERROR_R_3ARGS
or something and let the vxworks header define that one.
>
> 3. In the include\curl\curl.h file:
>
> delete following line:
>
> #include <sys/time.h>
That should then rather be done conditionally on that vxworks define I think.
Of course, this assumes you want to work with me to get the changes
incorporated into libcurl.
-- / daniel.haxx.seReceived on 2009-05-25