Skip to content

Commit 26e1f6f

Browse files
committed
ansic: omit flock/funlock calls in echoBinSafe
1 parent d0a9edd commit 26e1f6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/system/io.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ when declared(stdout):
610610
android_log_print(ANDROID_LOG_VERBOSE, "nim", s)
611611
else:
612612
# flockfile deadlocks some versions of Android 5.x.x
613-
when not defined(windows) and not defined(android) and not defined(nintendoswitch):
613+
when not defined(windows) and not defined(android) and not defined(nintendoswitch) and hostOS != "ansic":
614614
proc flockfile(f: File) {.importc, nodecl.}
615615
proc funlockfile(f: File) {.importc, nodecl.}
616616
flockfile(stdout)
@@ -624,7 +624,7 @@ when declared(stdout):
624624
const linefeed = "\n"
625625
discard c_fwrite(linefeed.cstring, linefeed.len, 1, stdout)
626626
discard c_fflush(stdout)
627-
when not defined(windows) and not defined(android) and not defined(nintendoswitch):
627+
when not defined(windows) and not defined(android) and not defined(nintendoswitch) and hostOS != "ansic":
628628
funlockfile(stdout)
629629
when defined(windows) and compileOption("threads"):
630630
releaseSys echoLock

0 commit comments

Comments
 (0)