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 @humm

because it isn't any random int, it's a file descriptor, or an error, it has semantic meaning beyond the fact that it's represented by a number

you wouldn't do arithmetic with any of them, you wouldn't type a random literal to a function that takes a fd -- the fd represents and object, not a number by itself
@navi @humm @ska well the last one you do when you need specifically stdin or stdout or stderr. but yea
@SRAZKVT @humm @ska

i use STDOUT_FILENO / STDIN_FILENO, actually, it's harder to mess up
@navi @humm @ska fair enough