summary refs log tree commit diff stats
path: root/lib/impure
diff options
context:
space:
mode:
authorEmery Hemingway <ehmry@posteo.net>2019-01-29 15:08:43 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-01-29 15:08:43 +0100
commit15422a3e5a24d6c10d1f713cff7e04289bf7a232 (patch)
treeee5250344ef3adb8453a15753fea0f27c1beb524 /lib/impure
parent07a0a61875f4f5c7ac74acfd0c7dd4e4eb333dce (diff)
downloadNim-15422a3e5a24d6c10d1f713cff7e04289bf7a232.tar.gz
Genode fixes (#10491)
Readline pasthru, add linker to config, do not pass -lm to linker.
Diffstat (limited to 'lib/impure')
-rw-r--r--lib/impure/rdstdin.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/impure/rdstdin.nim b/lib/impure/rdstdin.nim
index 54bab82f0..ac38addba 100644
--- a/lib/impure/rdstdin.nim
+++ b/lib/impure/rdstdin.nim
@@ -73,6 +73,15 @@ when defined(Windows):
          discard readConsoleInputW(hStdin, irInputRecord, 1, dwEventsRead)
          return result
 
+elif defined(genode):
+  proc readLineFromStdin*(prompt: string): TaintedString {.
+                          tags: [ReadIOEffect, WriteIOEffect].} =
+    stdin.readLine()
+
+  proc readLineFromStdin*(prompt: string, line: var TaintedString): bool {.
+                          tags: [ReadIOEffect, WriteIOEffect].} =
+    stdin.readLine(line)
+
 else:
   import linenoise, termios