diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 03:20:17 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 03:20:17 -0500 |
commit | f2d625756812464e15074a313abcc02d4bfdaf65 (patch) | |
tree | 84def1a2c84f6e70c3334fe137f0d0fea3c86a06 | |
parent | 00e1809a223037c0a4bf6e34e68014982b8b6a1d (diff) |
clean up structure definitions
-rw-r--r-- | src/stdio/_stdio.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h index 0827fe0d..3c8b7906 100644 --- a/src/stdio/_stdio.h +++ b/src/stdio/_stdio.h @@ -4,12 +4,11 @@ #include <stddef.h> #include <stdarg.h> #include <stdio.h> + #include "_safety.h" #ifdef _POSIX_C_SOURCE #include <sys/types.h> -#else -#include "sys/types/pid_t.h" #endif #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 199506L @@ -45,16 +44,19 @@ struct __FILE { int nlocks; /* in multithreaded, used by flockfile() */ int thread; /* the owning thread if locked */ + #ifdef _POSIX_C_SOURCE pid_t pipe_pid; /* if stream is a pipe, the child pid */ + #endif }; struct io_options { const char *fnname; /* the calling function */ char *string; /* NULL or the output string */ wchar_t *wstring; /* NULL or the output wide string */ - struct __FILE *stream; /* NULL or the output stream */ + FILE *stream; /* NULL or the output stream */ int fd; /* -1 or the output file descriptor */ size_t maxlen; /* max number of bytes to write to string */ + int ret; /* return value */ }; int __printf(struct io_options * restrict, const char * restrict, va_list); |