]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
system.h: assume OS400 is always built with ILEC compiler
authorJay Satiro <raysatiro@yahoo.com>
Fri, 20 Jan 2023 23:37:44 +0000 (18:37 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 21 Jan 2023 20:08:23 +0000 (15:08 -0500)
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 https://github.com/curl/curl/issues/10305
Closes https://github.com/curl/curl/pull/10329

include/curl/system.h

index 0eddeb8038a540f8731f71d4ecedbd7969d3d9ab..def7739242d8b631d7e49778da60192952209b68 100644 (file)
 #  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
 
 #elif defined(__OS400__)
-#  if defined(__ILEC400__)
-#    define CURL_TYPEOF_CURL_OFF_T     long long
-#    define CURL_FORMAT_CURL_OFF_T     "lld"
-#    define CURL_FORMAT_CURL_OFF_TU    "llu"
-#    define CURL_SUFFIX_CURL_OFF_T     LL
-#    define CURL_SUFFIX_CURL_OFF_TU    ULL
-#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
-#    define CURL_PULL_SYS_TYPES_H      1
-#    define CURL_PULL_SYS_SOCKET_H     1
-#  endif
+#  define CURL_TYPEOF_CURL_OFF_T     long long
+#  define CURL_FORMAT_CURL_OFF_T     "lld"
+#  define CURL_FORMAT_CURL_OFF_TU    "llu"
+#  define CURL_SUFFIX_CURL_OFF_T     LL
+#  define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURL_PULL_SYS_TYPES_H      1
+#  define CURL_PULL_SYS_SOCKET_H     1
 
 #elif defined(__MVS__)
 #  if defined(__IBMC__) || defined(__IBMCPP__)