summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2015-10-13 17:26:53 +0200
committerManuel Mohr <manuel.mohr@kit.edu>2015-10-13 17:26:53 +0200
commit9d7bfae28b6bb0d6db4718457a2ce5d77a67ec36 (patch)
treeabba742d9edb852a99e82beff0eac4b0d571b61f
parent1dad111dad292b5fd5c42152d209afe3ad2b4808 (diff)
Fix OctoPOS implementation of GC_write.
-rw-r--r--misc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/misc.c b/misc.c
index 6db67af..55bc6c5 100644
--- a/misc.c
+++ b/misc.c
@@ -1482,8 +1482,12 @@ GC_API void GC_CALL GC_enable_incremental(void)
DISABLE_CANCEL(cancel_state);
# if defined(OCTOPOS)
- return printf("%s", buf);
-# endif
+ (void)bytes_written;
+ (void)fd;
+ result = (int)fwrite(buf, 1, len, stdout);
+ RESTORE_CANCEL(cancel_state);
+ return result;
+# else
while ((size_t)bytes_written < len) {
# ifdef GC_SOLARIS_THREADS
@@ -1500,6 +1504,7 @@ GC_API void GC_CALL GC_enable_incremental(void)
}
RESTORE_CANCEL(cancel_state);
return(bytes_written);
+# endif
# endif
}