summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/impure/rdstdin.nim2
-rw-r--r--lib/pure/nativesockets.nim2
-rw-r--r--lib/pure/net.nim2
-rw-r--r--lib/pure/securehash.nim3
-rw-r--r--lib/pure/streams.nim5
-rw-r--r--lib/system/jssys.nim36
6 files changed, 8 insertions, 42 deletions
diff --git a/lib/impure/rdstdin.nim b/lib/impure/rdstdin.nim
index b373859f4..15137b436 100644
--- a/lib/impure/rdstdin.nim
+++ b/lib/impure/rdstdin.nim
@@ -100,7 +100,7 @@ when defined(Windows):
     stdout.write "\n"
 
 else:
-  import linenoise, termios, unsigned
+  import linenoise, termios
 
   proc readLineFromStdin*(prompt: string): TaintedString {.
                           tags: [ReadIOEffect, WriteIOEffect].} =
diff --git a/lib/pure/nativesockets.nim b/lib/pure/nativesockets.nim
index b5a8d5777..3951b46a3 100644
--- a/lib/pure/nativesockets.nim
+++ b/lib/pure/nativesockets.nim
@@ -12,7 +12,7 @@
 
 # TODO: Clean up the exports a bit and everything else in general.
 
-import unsigned, os
+import os
 
 when hostOS == "solaris":
   {.passl: "-lsocket -lnsl".}
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index d1016011e..1cfaf029f 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -10,7 +10,7 @@
 ## This module implements a high-level cross-platform sockets interface.
 
 {.deadCodeElim: on.}
-import nativesockets, os, strutils, unsigned, parseutils, times
+import nativesockets, os, strutils, parseutils, times
 export Port, `$`, `==`
 
 const useWinVersion = defined(Windows) or defined(nimdoc)
diff --git a/lib/pure/securehash.nim b/lib/pure/securehash.nim
index 8ac6acb0e..657782889 100644
--- a/lib/pure/securehash.nim
+++ b/lib/pure/securehash.nim
@@ -7,8 +7,7 @@
 #    distribution, for details about the copyright.
 #
 
-import
-  strutils, unsigned
+import strutils
 
 const Sha1DigestSize = 20
 
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim
index 38e91fee4..bb6175a12 100644
--- a/lib/pure/streams.nim
+++ b/lib/pure/streams.nim
@@ -148,7 +148,10 @@ proc write*[T](s: Stream, x: T) =
 proc write*(s: Stream, x: string) =
   ## writes the string `x` to the the stream `s`. No length field or
   ## terminating zero is written.
-  writeData(s, cstring(x), x.len)
+  when nimvm:
+    writeData(s, cstring(x), x.len)
+  else:
+    if x.len > 0: writeData(s, unsafeAddr x[0], x.len)
 
 proc writeLn*(s: Stream, args: varargs[string, `$`]) {.deprecated.} =
   ## **Deprecated since version 0.11.4:** Use **writeLine** instead.
diff --git a/lib/system/jssys.nim b/lib/system/jssys.nim
index 5bac54772..3df460952 100644
--- a/lib/system/jssys.nim
+++ b/lib/system/jssys.nim
@@ -417,42 +417,6 @@ proc absInt(a: int): int {.compilerproc.} =
 proc absInt64(a: int64): int64 {.compilerproc.} =
   result = if a < 0: a*(-1) else: a
 
-proc leU(a, b: int): bool {.compilerproc.} =
-  result = abs(a) <= abs(b)
-
-proc ltU(a, b: int): bool {.compilerproc.} =
-  result = abs(a) < abs(b)
-
-proc leU64(a, b: int64): bool {.compilerproc.} =
-  result = abs(a) <= abs(b)
-proc ltU64(a, b: int64): bool {.compilerproc.} =
-  result = abs(a) < abs(b)
-
-proc addU(a, b: int): int {.compilerproc.} =
-  result = abs(a) + abs(b)
-proc addU64(a, b: int64): int64 {.compilerproc.} =
-  result = abs(a) + abs(b)
-
-proc subU(a, b: int): int {.compilerproc.} =
-  result = abs(a) - abs(b)
-proc subU64(a, b: int64): int64 {.compilerproc.} =
-  result = abs(a) - abs(b)
-
-proc mulU(a, b: int): int {.compilerproc.} =
-  result = abs(a) * abs(b)
-proc mulU64(a, b: int64): int64 {.compilerproc.} =
-  result = abs(a) * abs(b)
-
-proc divU(a, b: int): int {.compilerproc.} =
-  result = abs(a) div abs(b)
-proc divU64(a, b: int64): int64 {.compilerproc.} =
-  result = abs(a) div abs(b)
-
-proc modU(a, b: int): int {.compilerproc.} =
-  result = abs(a) mod abs(b)
-proc modU64(a, b: int64): int64 {.compilerproc.} =
-  result = abs(a) mod abs(b)
-
 proc ze*(a: int): int {.compilerproc.} =
   result = a