From 000a7c045c98c30aac86db93f8c9c978e5ca8c59 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 30 Jan 2024 14:25:31 -0500 Subject: update standards and safety checks --- src/stdio/fclose.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/stdio/fclose.c') diff --git a/src/stdio/fclose.c b/src/stdio/fclose.c index 8649c718..f438a9c2 100644 --- a/src/stdio/fclose.c +++ b/src/stdio/fclose.c @@ -1,15 +1,17 @@ -#if 0 - #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #define POSIX_FORCED #endif + #include #include #include +#if 0 #include #include +#endif + #include "_stdio.h" #ifdef POSIX_FORCED @@ -21,6 +23,8 @@ int fclose(FILE *stream) { + SIGNAL_SAFE(0); + flockfile(stream); if (fflush(stream) == EOF) { /* set errno */ @@ -58,6 +62,3 @@ buffer was automatically allocated, it is freed. /* STDC(1) */ - - -#endif -- cgit v1.2.1