-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS400 compiling a C++ program with the include curl.h fails. #10305
Comments
@jonrumsey does this seem right to you? |
I can state with __cplusplus added I can compile C++ that includes curl.h. Without it fails with curl_off_t not defined. |
Yes, |
I agree that would be cleaner. |
Prior to this change the OS400 types were only defined when __ILEC400__. That symbol is only defined by IBM's C compiler and not their C++ compiler, which led to missing types when users would compile a C++ application. Assisted-by: Jon Rumsey Reported-by: John Sherrill Fixes curl#10305 Closes #xxxx
Prior to this change the OS400 types were only defined when __ILEC400__. That symbol is only defined by IBM's C compiler and not their C++ compiler, which led to missing types when users on OS400 would compile a C++ application that included curl. The IBM C and C++ compilers are the only native compilers on the platform. Assisted-by: Jon Rumsey Reported-by: John Sherrill Fixes curl#10305 Closes curl#10329
The include curl.h includes systems.h
systems.h has this section for OS400
__ILEC400__
is only defined if using the C compilerIf you what to use curl in C++ code the compile fails
since
CURL_TYPEOF_CURL_OFF_T
is not defined so the below code is not usedwhich causes errors in curl.h since curl_off_t is not defined.
adding || (__cplusplus) to the "#if defined(__ILEC400) line fixes the problem.
The text was updated successfully, but these errors were encountered: