we have pid_t and gid_t and uid_t but no fd_t

they're all ints why did fds get left out of the typedef club qwq
@navi we have errno_t as well and nobody uses it ever
@humm it's part of annex K iirc and things just don't implement annex K at all

but yeah returning errno_t instead of 'int' would be a lot better

@navi @humm Why do yall think that the multiplication of integer types is a good thing?

It's boilerplate, it makes the code less clear, it bloats header files, and if I need to serialize it I need to add a sysdep test to know what size it is. And the benefits of having specific integer types are dubious at best, I've never seen a strong argument for them.

What makes you want fd_t and errno_t over int or, if anything, int32_t?

@ska @navi @humm

Allow expressing semantics and intentions more clearly. But I don't think it really helps much without having a more complex type system than C has. Eg. casting from fd_t to uid_t or adding 1 to a fd_t value is semantically nonsense and would ideally cause a warning.

@sertonix @ska @navi @humm well technically you could do that if they're defined as a struct with just an int inside, but that's a hack and not in the c standard

@SRAZKVT @ska @navi @humm

I know it and I hate it :)