curl-library
Re: Help on usinig Curl on vxwrks
Date: Mon, 25 May 2009 09:42:26 -0400
On Mon, May 25, 2009 at 8:48 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> 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.se
>
Thanks for quick responses and suggestions.
I got the full source code package and am trying to work with that.
In the document section of the cURL website (
http://curl.haxx.se/docs/install.html) the section for "cross compiler"
suggests to run configure script after setting the approprate path and other
env variables.
I assume that, ideally, executing ./configure would make the appropriate
config-[os].h for me. and that creating my own config[os].h (as suggested by
you) would be another faster/surer way to do the same. Am I right?
However, on running ./configure I see the following error
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... (cached) no
checking for stdint.h... (cached) no
checking for unistd.h... no
checking for long... no
checking size of long... 0
checking for void*... no
checking size of void*... 0
configure: error: cannot find out size of long.
Any help would be appreciated.
Received on 2009-05-25