diff options
Diffstat (limited to 'src/grt/grt-files.adb')
-rw-r--r-- | src/grt/grt-files.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/grt/grt-files.adb b/src/grt/grt-files.adb index a47381289..694572362 100644 --- a/src/grt/grt-files.adb +++ b/src/grt/grt-files.adb @@ -26,6 +26,7 @@ with Grt.Errors; use Grt.Errors; with Grt.Stdio; use Grt.Stdio; with Grt.C; use Grt.C; with Grt.Table; +with Grt.Options; with System; use System; pragma Elaborate_All (Grt.Table); @@ -195,6 +196,9 @@ package body Grt.Files is if F = NULL_Stream then return Name_Error; end if; + if Grt.Options.Unbuffered_Writes and Mode /= Read_Mode then + setbuf (F, NULL_voids); + end if; end if; Sig := Files_Table.Table (File).Signature; if Sig /= null then |