Fix more 'undeclared identifier' errors.
This commit is contained in:
parent
502f7bffa3
commit
f66f43bca0
4 changed files with 6 additions and 5 deletions
|
|
@ -503,7 +503,8 @@ proc assignLocalVar(p: BProc, s: PSym) =
|
||||||
if sfRegister in s.flags: app(decl, " register")
|
if sfRegister in s.flags: app(decl, " register")
|
||||||
#elif skipTypes(s.typ, abstractInst).kind in GcTypeKinds:
|
#elif skipTypes(s.typ, abstractInst).kind in GcTypeKinds:
|
||||||
# app(decl, " GC_GUARD")
|
# app(decl, " GC_GUARD")
|
||||||
if sfVolatile in s.flags or p.nestedTryStmts.len > 0:
|
if sfVolatile in s.flags or (p.nestedTryStmts.len > 0 and
|
||||||
|
gCmd != cmdCompileToCpp):
|
||||||
app(decl, " volatile")
|
app(decl, " volatile")
|
||||||
appf(decl, " $1;$n", [s.loc.r])
|
appf(decl, " $1;$n", [s.loc.r])
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
## Serialization utilities for the compiler.
|
## Serialization utilities for the compiler.
|
||||||
import strutils
|
import strutils
|
||||||
|
|
||||||
proc c_sprintf(buf, frmt: cstring) {.importc: "sprintf", nodecl, varargs.}
|
proc c_sprintf(buf, frmt: cstring) {.importc: "sprintf", header: "<stdio.h>", nodecl, varargs.}
|
||||||
|
|
||||||
proc toStrMaxPrecision*(f: BiggestFloat): string =
|
proc toStrMaxPrecision*(f: BiggestFloat): string =
|
||||||
if f != f:
|
if f != f:
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@ var
|
||||||
|
|
||||||
proc genOid*(): TOid =
|
proc genOid*(): TOid =
|
||||||
## generates a new OID.
|
## generates a new OID.
|
||||||
proc rand(): cint {.importc: "rand", nodecl.}
|
proc rand(): cint {.importc: "rand", header: "<stdlib.h>", nodecl.}
|
||||||
proc gettime(dummy: ptr cint): cint {.importc: "time", header: "<time.h>".}
|
proc gettime(dummy: ptr cint): cint {.importc: "time", header: "<time.h>".}
|
||||||
proc srand(seed: cint) {.importc: "srand", nodecl.}
|
proc srand(seed: cint) {.importc: "srand", header: "<stdlib.h>", nodecl.}
|
||||||
|
|
||||||
var t = gettime(nil)
|
var t = gettime(nil)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -903,7 +903,7 @@ elif not defined(useNimRtl):
|
||||||
createStream(p.errStream, p.errHandle, fmRead)
|
createStream(p.errStream, p.errHandle, fmRead)
|
||||||
return p.errStream
|
return p.errStream
|
||||||
|
|
||||||
proc csystem(cmd: cstring): cint {.nodecl, importc: "system".}
|
proc csystem(cmd: cstring): cint {.nodecl, importc: "system", header: "<stdlib.h>".}
|
||||||
|
|
||||||
proc execCmd(command: string): int =
|
proc execCmd(command: string): int =
|
||||||
when defined(linux):
|
when defined(linux):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue