Conversation
lib/curl_setup.h
Outdated
|
|
||
| /* Set uintptr_t to fallback type for targets known to miss it from stdint.h */ | ||
| #ifdef __OS400__ | ||
| #define uintptr_t void * |
There was a problem hiding this comment.
I was hesitant to do this. IIUC OS400 doesn't define this since it doesn't make sense on that platform, so defining our own version could cause confusion. For our purposes today this will work, but it's not strictly correct. I would prefer having an OS400 exception and keeping the two !HAVE_STDINT_H paths for it to use.
There was a problem hiding this comment.
It makes sense to do it differently, yes.
The alterative I had in mind was a HAVE_UINPTR_T, which gets defined by default,
and e.g. config-os400.h #undef-ing it for OS400. Or something along these lines.
And keep the fallbacks in formdata.c and for CURL_UNCONST().
edit: I'll also keep MISSING_UINTPTR_T in mind, it may simplify things.
I'll push an update tomorrow.
curl requires
stdint.hfrom C99, and no longer builds without it sincev8.18.0 (after dropping VS2008 support). Assume it's available, drop
feature checks.
Also:
stdint.hincludes.HAVE_UINTPTR_T, enabled by default.HAVE_UINTPTR_T.cmp-config.plexception because cmakeand autotools both detect
stdint.himplicitly.Co-authored-by: Dan Fandrich
Ref: #20405
Ref: #20384
Follow-up to 2e1a045 #17931