curl-library
RE: strdup
Date: Fri, 12 Jul 2013 14:20:13 +0200
Yang Tse wrote:
> Attached (completely untested) patch should fix the issue. At least,
as long as libcurl isn't built as a shared library with symbol hiding
enabled.
> Give it a try,
Your patch is OK for lib1900.c, but not for lib509.c because it uses
(strdup)(ptr)
However by changing your patch to
#define strdup curlx_strdup
It compiles fine with that.
The next failure is linking: I do not export curlx_* symbols :-(
Finally, I managed to enable strdup on OS400 (it exists, but only for
C++: you have to define a special symbol to enable strcmpi(), strdup(),
etc for C). I think it's the cleaner solution.
By the way: if OS400 was the one an only platform without strdup(),
would'nt it be time to suppress "HAVE_STRDUP" and assume it is always
there ?
Thanks for your help,
Patrick
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-12