Attempted to build libcurl 7.64.1 on os400 V7R2M0:
CPD5D02: Definition not found for symbol 'Curl_vsetopt'.
CPD5D19: 1 warnings were issued from binder language compilation.
CPF5D05: Service program LIBCURL not created.
This looks like it may have been as a result of converting Curl_vsetopt() to a static function vsetopt() in lib/setopt.c, however there is still a call to Curl_vsetopt() in packages/OS400/ccsidcurl.c.
I expected the following
A clean build
IBM i V7R2M0
The text was updated successfully, but these errors were encountered:
This fix may build, but it surely won't run properly: while longs are 32-bits, pointers are 128-bits !
In addition, alignment is important and pointers must be handled as such or else they would lose their addressing capabilities.
I already faced this (3b548ff) and use of Curl_vsetopt() is the easiest way to avoid locally dispatching on tag argument CURLOPTTYPE_* to determine the proper type and proper calling sequence.
I suppose one way to fix this is to pass a pointer to curl_easy_setopt using va_arg(arg, char *) instead of the long value. curl_easy_setopt_ccsid() should ensure that callers are specifying a suitable tag with additional switch statements, the default case should return CURLE_UNKNOWN_OPTION.
Reverting the lib/setopt.c part of 05b100a should probably be enough. I wasn't aware of this use of the function when I made it static - and I would propose that we add a comment about it this time so that we can avoid doing this exact same dance again in a future! 😄