Prevent runtime warning on OS400 when CURL_DISABLE_PROXY is not defined.#4789
Prevent runtime warning on OS400 when CURL_DISABLE_PROXY is not defined.#4789jonrumsey wants to merge 1 commit into
Conversation
Prevent runtime warning when CURL_DISABLE_PROXY is not defined.
|
I don't really understand that check. The @monnerat, do you recall? |
Yes, very well, although it's more than 12 years old :-) I took this idea, but checked on the As the warning message says, I have reworked the function since then when needed. However, conditional definitions of the last The use of a |
I wasn't aware of this issue, but I agree with you that we can certainly avoid those #ifdefs as they don't offer much gain anyway. And we could mention that in a comment above the enum so that we don't do the mistake again... |
|
Regarding the check itself: today I would be in favor of replacing it with an external check at build time. But this would require the use of advanced scriptng and there is no serious standard (i.e.: available in OS400 distribution) scripting tool on OS400 but sh/sed/grep/etc. In addition, this would have to be debugged/tested by someone else. |
|
Thank you both for the feedback and I agree it would be better to know at build time that the OS400 string conversion code may need updating. I'll look at reworking the change to;
|
Great! |
"*** WARNING: curl_easy_setopt_ccsid() should be reworked ***" appears at runtime on OS400 when using curl_easy_setopt_ccsid() because the checks added in ccsidcurl.c to handle ASCII to EBCDIC string conversions does not correctly cater for CURL_DISABLE_PROXY being defined. When this is defined the integer value of STRING_LASTZEROTERMINATED is STRING_SASL_AUTHZID + 1, however when it is not defined the value is STRING_TEMP_URL + 1. The code that generates the runtime warning should factor this into its checks.