summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRyan Schmidt <git@ryandesign.com>2022-12-07 11:00:41 -0600
committerDaniel Stenberg <daniel@haxx.se>2022-12-09 08:21:15 +0100
commitac4554870d40ffd5de0a95df162a3a8b6cfcc7aa (patch)
treed92247c68da6d5690cb67104e451fc55948ba036 /include
parentb8e605adef8fecf765a20bcf1ed0c53d6389d109 (diff)
downloadcurl-ac4554870d40ffd5de0a95df162a3a8b6cfcc7aa.tar.gz
system.h: fix socklen_t, curl_off_t, long long for Classic Mac OS
Change "__MWERKS__" to "macintosh". When this block was originally added in 3ac6929 it was probably intended to handle classic Mac OS since the previous classic Mac OS build procedure for curl (which was removed in bf327a9) used Metrowerks CodeWarrior. But there are other classic Mac OS compilers, such as the MPW compilers, that were not handled by this case. For classic Mac OS, CURL_TYPEOF_CURL_SOCKLEN_T needs to match what's provided by the third-party GUSI library, which does not vary by compiler. Meanwhile CodeWarrior works on platforms other than classic Mac OS, and they may need different definitions. Separate blocks could be added later for any of those platforms that curl doesn't already support. Closes #10049
Diffstat (limited to 'include')
-rw-r--r--include/curl/system.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/include/curl/system.h b/include/curl/system.h
index df69d4f7d..11db51ecf 100644
--- a/include/curl/system.h
+++ b/include/curl/system.h
@@ -164,13 +164,22 @@
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
-#elif defined(__MWERKS__)
-# 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 int
+#elif defined(macintosh)
+# include <ConditionalMacros.h>
+# if TYPE_LONGLONG
+# 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 unsigned int
#elif defined(__TANDEM)
# if ! defined(__LP64)