From f2d625756812464e15074a313abcc02d4bfdaf65 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 03:20:17 -0500 Subject: clean up structure definitions --- src/stdio/_stdio.h | 8 +++++--- 1 file 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 #include #include + #include "_safety.h" #ifdef _POSIX_C_SOURCE #include -#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); -- cgit v1.2.1