You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This impacts any OS/400 headers that are included after curl header files, this can be worked around by including curl headers last or by undefining "OS" before including other headers. A better fix would be to apply a 'CURL_' prefix to the define i.e. 'CURL_OS' so that a string literal is not expanded incorrectly in place of OS.
curl/libcurl version
curl 8.10.1
operating system
OS/400 V7R4M0
The text was updated successfully, but these errors were encountered:
I did this
Whilst developing some code to call the platform APIs on OS/400 to seed a PRNG;
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/qc3addprngseed.html
These calls fail at runtime with MCH3601 exceptions, this only occurs when first including curl header files.
I expected the following
To be able to include curl headers before or after unrelated header files.
Many OS/400 system header files use pragmas to control how pointers are passed to APIs
https://www.ibm.com/docs/en/i/7.5?topic=descriptions-argument
Unfortunately the platform specific headers in curl (e.g. lib/config-os400.h) define "OS";
This gets expanded by the preprocessor and breaks any pragma that uses OS;
This impacts any OS/400 headers that are included after curl header files, this can be worked around by including curl headers last or by undefining "OS" before including other headers. A better fix would be to apply a 'CURL_' prefix to the define i.e. 'CURL_OS' so that a string literal is not expanded incorrectly in place of OS.
curl/libcurl version
curl 8.10.1
operating system
OS/400 V7R4M0
The text was updated successfully, but these errors were encountered: