Hi Przemek,

1. You left in the code:

     #if LIBCURL_VERSION_NUM < 0x071100
        #error hbcurl: Harbour hbcurl needs libcurl 7.17.0 or upper.
     #endif

  Anyhow after your modifications it can be cleanly compiled also
  with older CURL library versions (I tested 7.16.4). Are such builds
  functional in the part which is supported by earlier CURL versions.
  If yes then why we keep above #error message?

The reason is that starting 7.17.0 libcurl handles passed strings
to curl_easy_setopt() differently so that it automatically makes
a copy of the passed string and deals with the management of that.
Previous versions required a static buffer to be passed, so in my
understanding, hb_parc[x]() return values couldn't be used safely.

See:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
[ DESCRIPTION / NOTE ]

2. The memory mapping is not redirected to Harbour hb_x*() memory
  functions. I can see in the code:

  #ifdef _HB_CURL_REDEF_MEM
/* NOTE/TOFIX: _HB_CURL_REDEF_MEM doesn't work at this moment, as hb_xgrab() is getting pointers not allocated by our allocators. [vszakats] */
  [...]

  It's not clear for me what the above note means.
  Can you tell me more precisely what is wrong?

If you enable _HB_CURL_REDEF_MEM, and have FM stats enabled,
Harbour will show an internal error saying that an attempt
was made to realloc or free an invalid buffer. Which to me
suggested that the buffer was not allocated by an hb_x*()
call. This behaviour could be seen when running some simple
program.

But:

I've retested now (with libcurl 7.18.1), and I cannot replicate
it anymore, so it might well be caused by something we've
cleared up in the many cleanups since my NOTE/TOFIX.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to