From 1a14f2179b756dda710a811c40f0f7b2df5b9f37 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Wed, 23 Aug 2023 14:55:31 +0200 Subject: [PATCH] system.h: add CURL_OFF_T definitions on HP-UX with HP aCC HP-UX on IA64 provides two modes: 32 and 64 bit while 32 bit being the default one. Use "long long" in 32 bit mode and just "long" in 64 bit mode. Closes #11718 --- include/curl/system.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/curl/system.h b/include/curl/system.h index b2640c8bdd..97e0d037a9 100644 --- a/include/curl/system.h +++ b/include/curl/system.h @@ -347,6 +347,24 @@ # define CURL_PULL_SYS_TYPES_H 1 # define CURL_PULL_SYS_SOCKET_H 1 +#elif defined(__hpux) /* HP aCC compiler */ +# if !defined(_LP64) +# 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 +# else +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 + /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ /* ===================================== */