diff --git a/lib/nimbase.h b/lib/nimbase.h index 61e7da75e..a73933a40 100755 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -192,7 +192,7 @@ __clang__ ** long int lrint (double x); */ -#if defined(__LCC__) || (defined(__GNUC__) && defined(WIN32)) +#if defined(__LCC__) || (defined(__GNUC__)) /* Linux' GCC does not seem to have these. Why? */ # define HAVE_LRINT # define HAVE_LRINTF diff --git a/lib/pure/math.nim b/lib/pure/math.nim index 6a1fc0063..6f3135d13 100755 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -186,10 +186,12 @@ when not defined(ECMAScript): proc trunc*(x: float): float {.importc: "trunc", nodecl.} proc floor*(x: float): float {.importc: "floor", nodecl.} + proc ceil*(x: float): float {.importc: "ceil", nodecl.} else: proc mathrandom(): float {.importc: "Math.random", nodecl.} proc floor*(x: float): float {.importc: "Math.floor", nodecl.} + proc ceil*(x: float): float {.importc: "Math.ceil", nodecl.} proc random*(max: int): int = return int(floor(mathrandom() * float(max))) proc randomize*() = nil diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 4cb873b1c..eded16d21 100755 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -557,9 +557,9 @@ proc format*(info: TTimeInfo, f: string): string = result.add("0") result.add($info.monthday) of "ddd": - result.add(($info.monthday)[0 .. 2]) + result.add(($info.weekday)[0 .. 2]) of "dddd": - result.add($info.monthday) + result.add($info.weekday) of "h": result.add($(info.hour - 12)) of "hh":