Conversation
Notices
-
Embed this notice
:p: (p@bae.st)'s status on Wednesday, 03-Apr-2024 15:11:10 JST :p:
Apparently, WAF is even more fucking stupid than autotools.
yes,_sizeof_uint32_t_is_4_goddamn_bytes.png- :blobancap: :blobcattrans: :blobancap: :blobcattrans: :blobancap: :blobcattrans: and ✙ dcc :pedomustdie: :phear_slackware: like this.
-
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Thursday, 04-Apr-2024 13:27:28 JST Haelwenn /элвэн/ :triskell:
@p also checking the size of size_t… smells like they want their shit to break, although it's unlikely we're going need over 8 octets for size_t anytime soon.
-
Embed this notice
:p: (p@bae.st)'s status on Friday, 05-Apr-2024 06:52:05 JST :p:
@lanodan I think checking the size of that is probably reasonable for things like memory allocation, though I suspect that it's just a list of all the types in stdint. (And why they can't just use sizeof is a mystery. It is really obvious what's going on if you see `if(sizeof(size_t) == 8)`, and even trivial compilers remove the branch when compile-time constants are compared, but some preprocessor macro for _SIZE_OF_SIZE_T is at least an extra level of indirection, and it is practically guaranteed that they are using `#if` instead of just `if`.) Haelwenn /элвэн/ :triskell: likes this. -
Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Friday, 05-Apr-2024 06:56:28 JST Haelwenn /элвэн/ :triskell:
@p And they're also checking the exact sizes rather than say sizeof(size_t) >= 4 which you might want if you need to allocate for more than 4 GiB (which I'd find questionable in samba).
And I could see needing to have it being done at configure time to pick between .c files implementing the same API instead of some #ifdef horror (but in samba it's likely written as an #ifdef horror).