summaryrefslogtreecommitdiff
path: root/src/stdio/fflush.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-30 14:25:31 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-30 14:25:31 -0500
commit000a7c045c98c30aac86db93f8c9c978e5ca8c59 (patch)
treef882b1258d0c9b32f8517a9557b86e6ebc8aa9bb /src/stdio/fflush.c
parentb25685d5dc26370ecae112f805b4141c4efdeea4 (diff)
update standards and safety checks
Diffstat (limited to 'src/stdio/fflush.c')
-rw-r--r--src/stdio/fflush.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c
index 8adb0a10..23899e82 100644
--- a/src/stdio/fflush.c
+++ b/src/stdio/fflush.c
@@ -1,13 +1,11 @@
-#if 0
-
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#define POSIX_FORCED
#endif
#include <stdio.h>
-#include <sys/types.h>
-#include <unistd.h>
+//#include <sys/types.h>
+//#include <unistd.h>
#include "_stdio.h"
#ifdef POSIX_FORCED
@@ -21,6 +19,8 @@ int fflush(FILE *stream)
{
int ret = 0;
+ SIGNAL_SAFE(0);
+
if (stream == NULL) {
size_t i;
for (i = 0; i < FOPEN_MAX; i++) {
@@ -63,6 +63,3 @@ UNDEFINED(ARGUMENT(stream) is not an output stream)
UNDEFINED(ARGUMENT(stream) is an update stream in which the most recent operation was input)
STDC(1)
*/
-
-
-#endif