diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-30 14:25:31 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-30 14:25:31 -0500 |
| commit | 000a7c045c98c30aac86db93f8c9c978e5ca8c59 (patch) | |
| tree | f882b1258d0c9b32f8517a9557b86e6ebc8aa9bb /src/stdio/fclose.c | |
| parent | b25685d5dc26370ecae112f805b4141c4efdeea4 (diff) | |
update standards and safety checks
Diffstat (limited to 'src/stdio/fclose.c')
| -rw-r--r-- | src/stdio/fclose.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 <stdio.h> #include <stdlib.h> #include <string.h> +#if 0 #include <sys/types.h> #include <unistd.h> +#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 |
