Skip to content

Commit

Permalink
ansic: omit flock/funlock calls in echoBinSafe
Browse files Browse the repository at this point in the history
  • Loading branch information
zevv committed Jan 10, 2020
1 parent d0a9edd commit 26e1f6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/system/io.nim
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ when declared(stdout):
android_log_print(ANDROID_LOG_VERBOSE, "nim", s)
else:
# flockfile deadlocks some versions of Android 5.x.x
when not defined(windows) and not defined(android) and not defined(nintendoswitch):
when not defined(windows) and not defined(android) and not defined(nintendoswitch) and hostOS != "ansic":
proc flockfile(f: File) {.importc, nodecl.}
proc funlockfile(f: File) {.importc, nodecl.}
flockfile(stdout)
Expand All @@ -624,7 +624,7 @@ when declared(stdout):
const linefeed = "\n"
discard c_fwrite(linefeed.cstring, linefeed.len, 1, stdout)
discard c_fflush(stdout)
when not defined(windows) and not defined(android) and not defined(nintendoswitch):
when not defined(windows) and not defined(android) and not defined(nintendoswitch) and hostOS != "ansic":
funlockfile(stdout)
when defined(windows) and compileOption("threads"):
releaseSys echoLock
Expand Down

0 comments on commit 26e1f6f

Please sign in to comment.