From 9145bcfbb680d653f167a1a12f7830025aa951a5 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 23 Dec 2013 01:17:48 +0100 Subject: new VM: some progress for the FFI support --- lib/system/sysio.nim | 4 ++-- lib/system/widestrs.nim | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/system') diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index a877f8b28..5af1c96d4 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -194,9 +194,9 @@ const # should not be translated. -proc Open(f: var TFile, filename: string, +proc open(f: var TFile, filename: string, mode: TFileMode = fmRead, - bufSize: int = -1): Bool = + bufSize: int = -1): bool = var p: pointer = fopen(filename, FormatOpen[mode]) result = (p != nil) f = cast[TFile](p) diff --git a/lib/system/widestrs.nim b/lib/system/widestrs.nim index cf1f0910c..6a699274c 100644 --- a/lib/system/widestrs.nim +++ b/lib/system/widestrs.nim @@ -101,7 +101,8 @@ proc newWideCString*(s: cstring): WideCString = if s.isNil: return nil when not defined(c_strlen): - proc c_strlen(a: CString): int {.nodecl, noSideEffect, importc: "strlen".} + proc c_strlen(a: cstring): int {. + header: "", noSideEffect, importc: "strlen".} let L = cstrlen(s) result = newWideCString(s, L) -- cgit 1.4.1-2-gfad0 From 4447c1b7e323443a26189140410814195eee18a9 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 23 Dec 2013 08:28:32 +0100 Subject: tcnstseq works again --- compiler/sem.nim | 14 +++++++++++--- compiler/vm.nim | 6 +++--- lib/system/widestrs.nim | 3 +++ 3 files changed, 17 insertions(+), 6 deletions(-) (limited to 'lib/system') diff --git a/compiler/sem.nim b/compiler/sem.nim index f639b831a..ed3c0e045 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -43,7 +43,7 @@ proc activate(c: PContext, n: PNode) proc semQuoteAst(c: PContext, n: PNode): PNode proc finishMethod(c: PContext, s: PSym) -proc IndexTypesMatch(c: PContext, f, a: PType, arg: PNode): PNode +proc indexTypesMatch(c: PContext, f, a: PType, arg: PNode): PNode proc typeMismatch(n: PNode, formal, actual: PType) = if formal.kind != tyError and actual.kind != tyError: @@ -63,7 +63,7 @@ proc fitNode(c: PContext, formal: PType, arg: PNode): PNode = if result == nil: typeMismatch(arg, formal, arg.typ) # error correction: - result = copyNode(arg) + result = copyTree(arg) result.typ = formal var CommonTypeBegin = PType(kind: tyExpr) @@ -211,7 +211,15 @@ proc semConstExpr(c: PContext, n: PNode): PNode = # recompute the types as 'eval' isn't guaranteed to construct types nor # that the types are sound: result = semExprWithType(c, result) - result = fitNode(c, e.typ, result) + #result = fitNode(c, e.typ, result) inlined with special case: + let arg = result + result = indexTypesMatch(c, e.typ, arg.typ, arg) + if result == nil: + result = arg + # for 'tcnstseq' we support [] to become 'seq' + if e.typ.skipTypes(abstractInst).kind == tySequence and + arg.typ.skipTypes(abstractInst).kind == tyArrayConstr: + arg.typ = e.typ include hlo, seminst, semcall diff --git a/compiler/vm.nim b/compiler/vm.nim index 854b491fb..709baf7b2 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -632,10 +632,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode = # we pass 'tos.slots' instead of 'regs' so that the compiler can keep # 'regs' in a register: when hasFFI: - if c.globals.sons[prc.position-1].kind == nkEmpty: + let prcValue = c.globals.sons[prc.position-1] + if prcValue.kind == nkEmpty: globalError(c.debug[pc], errGenerated, "canot run " & prc.name.s) - let newValue = callForeignFunction(c.globals.sons[prc.position-1], - prc.typ, tos.slots, + let newValue = callForeignFunction(prcValue, prc.typ, tos.slots, rb+1, rc-1, c.debug[pc]) if newValue.kind != nkEmpty: assert instr.opcode == opcIndCallAsgn diff --git a/lib/system/widestrs.nim b/lib/system/widestrs.nim index 6a699274c..d856cc830 100644 --- a/lib/system/widestrs.nim +++ b/lib/system/widestrs.nim @@ -9,6 +9,9 @@ ## Nimrod support for C/C++'s `wide strings`:idx:. This is part of the system ## module! Do not import it directly! + +when not defined(NimString): + {.error: "You must not import this module explicitly".} type TUtf16Char* = distinct int16 -- cgit 1.4.1-2-gfad0 From 32ef1f8f323044c0d92f1beef396ce3223a96231 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 23 Dec 2013 20:12:13 +0100 Subject: vm: FFI improvements --- compiler/evalffi.nim | 3 +++ compiler/vmgen.nim | 5 +---- lib/system.nim | 8 ++++++-- lib/system/ansi_c.nim | 46 +++++++++++++++++++++++++++++++--------------- lib/system/sysio.nim | 20 ++++++++++++++------ tools/detect/detect.nim | 2 +- 6 files changed, 56 insertions(+), 28 deletions(-) (limited to 'lib/system') diff --git a/compiler/evalffi.nim b/compiler/evalffi.nim index f2337f7ce..3b8ce0505 100644 --- a/compiler/evalffi.nim +++ b/compiler/evalffi.nim @@ -41,6 +41,8 @@ proc getDll(cache: var TDllCache; dll: string; info: TLineInfo): pointer = const nkPtrLit = nkIntLit # hopefully we can get rid of this hack soon +var myerrno {.importc: "errno", header: "".}: cint ## error variable + proc importcSymbol*(sym: PSym): PNode = let name = ropeToStr(sym.loc.r) @@ -51,6 +53,7 @@ proc importcSymbol*(sym: PSym): PNode = of "stdin": result.intVal = cast[TAddress](system.stdin) of "stdout": result.intVal = cast[TAddress](system.stdout) of "stderr": result.intVal = cast[TAddress](system.stderr) + of "vmErrnoWrapper": result.intVal = cast[TAddress](myerrno) else: let lib = sym.annex if lib != nil and lib.path.kind notin {nkStrLit..nkTripleStrLit}: diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 486d24e6c..ab120f008 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -945,10 +945,7 @@ proc genTypeLit(c: PCtx; t: PType; dest: var TDest) = proc importcSym(c: PCtx; info: TLineInfo; s: PSym) = when hasFFI: if allowFFI in c.features: - if s.kind == skVar and lfNoDecl in s.loc.flags: - c.globals.add(copyNode(emptyNode)) - else: - c.globals.add(importcSymbol(s)) + c.globals.add(importcSymbol(s)) s.position = c.globals.len else: localError(info, errGenerated, "VM is not allowed to 'importc'") diff --git a/lib/system.nim b/lib/system.nim index 106eb04a3..14be9cc21 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -186,7 +186,10 @@ proc `..`*[T](b: T): TSlice[T] {.noSideEffect, inline.} = when not defined(niminheritable): {.pragma: inheritable.} -when not defined(JS) and not defined(NimrodVM): +const NoFakeVars* = defined(NimrodVM) ## true if the backend doesn't support \ + ## "fake variables" like 'var EBADF {.importc.}: cint'. + +when not defined(JS): type TGenericSeq {.compilerproc, pure, inheritable.} = object len, reserved: int @@ -195,7 +198,8 @@ when not defined(JS) and not defined(NimrodVM): NimStringDesc {.compilerproc, final.} = object of TGenericSeq data: array[0..100_000_000, char] NimString = ptr NimStringDesc - + +when not defined(JS) and not defined(NimrodVM): template space(s: PGenericSeq): int {.dirty.} = s.reserved and not seqShallowFlag diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index 13e8496d2..25b6d9c48 100644 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -40,21 +40,31 @@ var # constants faked as variables: when not defined(SIGINT): - var - SIGINT {.importc: "SIGINT", nodecl.}: cint - SIGSEGV {.importc: "SIGSEGV", nodecl.}: cint - SIGABRT {.importc: "SIGABRT", nodecl.}: cint - SIGFPE {.importc: "SIGFPE", nodecl.}: cint - SIGILL {.importc: "SIGILL", nodecl.}: cint + when NoFakeVars: + when defined(windows): + const + SIGABRT = cint(22) + SIGFPE = cint(8) + SIGILL = cint(4) + SIGINT = cint(2) + SIGSEGV = cint(11) + SIGTERM = cint(15) + else: + {.error: "SIGABRT not ported to your platform".} + else: + var + SIGINT {.importc: "SIGINT", nodecl.}: cint + SIGSEGV {.importc: "SIGSEGV", nodecl.}: cint + SIGABRT {.importc: "SIGABRT", nodecl.}: cint + SIGFPE {.importc: "SIGFPE", nodecl.}: cint + SIGILL {.importc: "SIGILL", nodecl.}: cint when defined(macosx): var SIGBUS {.importc: "SIGBUS", nodecl.}: cint # hopefully this does not lead to new bugs else: - var - SIGBUS {.importc: "SIGSEGV", nodecl.}: cint - # only Mac OS X has this shit + template SIGBUS: expr = SIGSEGV proc c_longjmp(jmpb: C_JmpBuf, retval: cint) {. header: "", importc: "longjmp".} @@ -111,16 +121,22 @@ proc c_realloc(p: pointer, newsize: int): pointer {. when hostOS != "standalone": when not defined(errno): - var errno {.importc, header: "".}: cint ## error variable + when defined(NimrodVM): + var vmErrnoWrapper {.importc.}: ptr cint + template errno: expr = + bind vmErrnoWrapper + vmErrnoWrapper[] + else: + var errno {.importc, header: "".}: cint ## error variable proc strerror(errnum: cint): cstring {.importc, header: "".} -proc c_remove(filename: CString): cint {. +proc c_remove(filename: cstring): cint {. importc: "remove", header: "".} -proc c_rename(oldname, newname: CString): cint {. +proc c_rename(oldname, newname: cstring): cint {. importc: "rename", header: "".} -proc c_system(cmd: CString): cint {.importc: "system", header: "".} -proc c_getenv(env: CString): CString {.importc: "getenv", header: "".} -proc c_putenv(env: CString): cint {.importc: "putenv", header: "".} +proc c_system(cmd: cstring): cint {.importc: "system", header: "".} +proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "".} +proc c_putenv(env: cstring): cint {.importc: "putenv", header: "".} {.pop} diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index 5af1c96d4..23f4e874c 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -45,9 +45,17 @@ proc setvbuf(stream: TFile, buf: pointer, typ, size: cint): cint {. proc write(f: TFile, c: cstring) = fputs(c, f) {.pop.} -var - IOFBF {.importc: "_IOFBF", nodecl.}: cint - IONBF {.importc: "_IONBF", nodecl.}: cint +when NoFakeVars: + when defined(windows): + const + IOFBF = cint(0) + IONBF = cint(4) + else: + {.error: "IOFBF not ported to your platform".} +else: + var + IOFBF {.importc: "_IOFBF", nodecl.}: cint + IONBF {.importc: "_IONBF", nodecl.}: cint const buf_size = 4000 @@ -149,7 +157,7 @@ proc writeFile(filename, content: string) = finally: close(f) -proc EndOfFile(f: TFile): bool = +proc endOfFile(f: TFile): bool = # do not blame me; blame the ANSI C standard this is so brain-damaged var c = fgetc(f) ungetc(c, f) @@ -223,10 +231,10 @@ proc fwrite(buf: Pointer, size, n: int, f: TFile): int {. proc readBuffer(f: TFile, buffer: pointer, len: int): int = result = fread(buffer, 1, len, f) -proc ReadBytes(f: TFile, a: var openarray[int8], start, len: int): int = +proc readBytes(f: TFile, a: var openarray[int8], start, len: int): int = result = readBuffer(f, addr(a[start]), len) -proc ReadChars(f: TFile, a: var openarray[char], start, len: int): int = +proc readChars(f: TFile, a: var openarray[char], start, len: int): int = result = readBuffer(f, addr(a[start]), len) {.push stackTrace:off, profiler:off.} diff --git a/tools/detect/detect.nim b/tools/detect/detect.nim index b2beba828..87b682ad5 100644 --- a/tools/detect/detect.nim +++ b/tools/detect/detect.nim @@ -66,7 +66,7 @@ proc main = if not myExec(gen.addFileExt(ExeExt)): quit(1) else: if not myExec("./" & gen): quit(1) - removeFile(addFileExt(gen, "c")) + #removeFile(addFileExt(gen, "c")) echo("Success") proc v(name: string, typ: TTypeKind=cint) = -- cgit 1.4.1-2-gfad0 From feb9af48f1600ce814bc3b62765894ba503ec108 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 24 Dec 2013 00:21:22 +0100 Subject: NoFakeVars progress --- lib/pure/os.nim | 29 +- lib/pure/sockets.nim | 2 +- lib/system/ansi_c.nim | 15 +- lib/system/sysio.nim | 4 + tools/detect/macosx_consts.nim | 629 ++++++++++++++++++++++++++++++++++ tools/detect/windows_amd64_consts.nim | 152 ++++++++ tools/detect/windows_i386_consts.nim | 96 ++++++ 7 files changed, 912 insertions(+), 15 deletions(-) create mode 100644 tools/detect/macosx_consts.nim create mode 100644 tools/detect/windows_amd64_consts.nim create mode 100644 tools/detect/windows_i386_consts.nim (limited to 'lib/system') diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 91893d169..2e15587f4 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -165,8 +165,12 @@ else: # UNIX-like operating system DynlibFormat* = when defined(macosx): "lib$1.dylib" else: "lib$1.so" when defined(posix): - var - pathMax {.importc: "PATH_MAX", header: "".}: cint + when NoFakeVars: + const pathMax = 5000 # doesn't matter really. The concept of PATH_MAX + # doesn't work anymore on modern OSes. + else: + var + pathMax {.importc: "PATH_MAX", header: "".}: cint const ExtSep* = '.' @@ -517,7 +521,7 @@ proc `/` * (head, tail: string): string {.noSideEffect.} = ## assert "" / "lib" == "lib" ## assert "" / "/lib" == "/lib" ## assert "usr/" / "/lib" == "usr/lib" - return JoinPath(head, tail) + return joinPath(head, tail) proc splitPath*(path: string): tuple[head, tail: string] {. noSideEffect, rtl, extern: "nos$1".} = @@ -527,11 +531,11 @@ proc splitPath*(path: string): tuple[head, tail: string] {. ## Examples: ## ## .. code-block:: nimrod - ## SplitPath("usr/local/bin") -> ("usr/local", "bin") - ## SplitPath("usr/local/bin/") -> ("usr/local/bin", "") - ## SplitPath("bin") -> ("", "bin") - ## SplitPath("/bin") -> ("", "bin") - ## SplitPath("") -> ("", "") + ## splitPath("usr/local/bin") -> ("usr/local", "bin") + ## splitPath("usr/local/bin/") -> ("usr/local/bin", "") + ## splitPath("bin") -> ("", "bin") + ## splitPath("/bin") -> ("", "bin") + ## splitPath("") -> ("", "") var sepPos = -1 for i in countdown(len(path)-1, 0): if path[i] in {dirsep, altsep}: @@ -957,7 +961,10 @@ proc moveFile*(source, dest: string) {.rtl, extern: "nos$1", raise newException(EOS, $strerror(errno)) when not defined(ENOENT) and not defined(Windows): - var ENOENT {.importc, header: "".}: cint + when NoFakeVars: + const ENOENT = cint(2) # 2 on most systems including Solaris + else: + var ENOENT {.importc, header: "".}: cint when defined(Windows): when useWinUnicode: @@ -1014,7 +1021,7 @@ when defined(windows): proc strEnd(cstr: wideCString, c = 0'i32): wideCString {. importc: "wcschr", header: "".} else: - proc strEnd(cstr: CString, c = 0'i32): CString {. + proc strEnd(cstr: cstring, c = 0'i32): cstring {. importc: "strchr", header: "".} proc getEnvVarsC() = @@ -1319,7 +1326,7 @@ proc copyDir*(source, dest: string) {.rtl, extern: "nos$1", copyFile(path, dest / noSource) of pcDir: copyDir(path, dest / noSource) - else: nil + else: discard proc parseCmdLine*(c: string): seq[string] {. noSideEffect, rtl, extern: "nos$1".} = diff --git a/lib/pure/sockets.nim b/lib/pure/sockets.nim index 66bb1e6a9..684def978 100644 --- a/lib/pure/sockets.nim +++ b/lib/pure/sockets.nim @@ -131,7 +131,7 @@ type ETimeout* = object of ESynch -let +const InvalidSocket*: TSocket = nil ## invalid socket when defined(windows): diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index 25b6d9c48..398656d0a 100644 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -49,6 +49,14 @@ when not defined(SIGINT): SIGINT = cint(2) SIGSEGV = cint(11) SIGTERM = cint(15) + elif defined(macosx): + const + SIGABRT = cint(6) + SIGFPE = cint(8) + SIGILL = cint(4) + SIGINT = cint(2) + SIGSEGV = cint(11) + SIGTERM = cint(15) else: {.error: "SIGABRT not ported to your platform".} else: @@ -60,9 +68,10 @@ when not defined(SIGINT): SIGILL {.importc: "SIGILL", nodecl.}: cint when defined(macosx): - var - SIGBUS {.importc: "SIGBUS", nodecl.}: cint - # hopefully this does not lead to new bugs + when NoFakeVars: + const SIGBUS = cint(10) + else: + var SIGBUS {.importc: "SIGBUS", nodecl.}: cint else: template SIGBUS: expr = SIGSEGV diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index 23f4e874c..8d9400a7d 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -50,6 +50,10 @@ when NoFakeVars: const IOFBF = cint(0) IONBF = cint(4) + elif defined(macosx): + const + IOFBF = cint(0) + IONBF = cint(2) else: {.error: "IOFBF not ported to your platform".} else: diff --git a/tools/detect/macosx_consts.nim b/tools/detect/macosx_consts.nim new file mode 100644 index 000000000..e8be56e5f --- /dev/null +++ b/tools/detect/macosx_consts.nim @@ -0,0 +1,629 @@ +# Generated by detect.nim +const + AIO_ALLDONE* = cint(1) + AIO_CANCELED* = cint(2) + AIO_NOTCANCELED* = cint(4) + LIO_NOP* = cint(0) + LIO_NOWAIT* = cint(1) + LIO_READ* = cint(1) + LIO_WAIT* = cint(2) + LIO_WRITE* = cint(2) + RTLD_LAZY* = cint(1) + RTLD_NOW* = cint(2) + RTLD_GLOBAL* = cint(8) + RTLD_LOCAL* = cint(4) + E2BIG* = cint(7) + EACCES* = cint(13) + EADDRINUSE* = cint(48) + EADDRNOTAVAIL* = cint(49) + EAFNOSUPPORT* = cint(47) + EAGAIN* = cint(35) + EALREADY* = cint(37) + EBADF* = cint(9) + EBADMSG* = cint(94) + EBUSY* = cint(16) + ECANCELED* = cint(89) + ECHILD* = cint(10) + ECONNABORTED* = cint(53) + ECONNREFUSED* = cint(61) + ECONNRESET* = cint(54) + EDEADLK* = cint(11) + EDESTADDRREQ* = cint(39) + EDOM* = cint(33) + EDQUOT* = cint(69) + EEXIST* = cint(17) + EFAULT* = cint(14) + EFBIG* = cint(27) + EHOSTUNREACH* = cint(65) + EIDRM* = cint(90) + EILSEQ* = cint(92) + EINPROGRESS* = cint(36) + EINTR* = cint(4) + EINVAL* = cint(22) + EIO* = cint(5) + EISCONN* = cint(56) + EISDIR* = cint(21) + ELOOP* = cint(62) + EMFILE* = cint(24) + EMLINK* = cint(31) + EMSGSIZE* = cint(40) + EMULTIHOP* = cint(95) + ENAMETOOLONG* = cint(63) + ENETDOWN* = cint(50) + ENETRESET* = cint(52) + ENETUNREACH* = cint(51) + ENFILE* = cint(23) + ENOBUFS* = cint(55) + ENODATA* = cint(96) + ENODEV* = cint(19) + ENOENT* = cint(2) + ENOEXEC* = cint(8) + ENOLCK* = cint(77) + ENOLINK* = cint(97) + ENOMEM* = cint(12) + ENOMSG* = cint(91) + ENOPROTOOPT* = cint(42) + ENOSPC* = cint(28) + ENOSR* = cint(98) + ENOSTR* = cint(99) + ENOSYS* = cint(78) + ENOTCONN* = cint(57) + ENOTDIR* = cint(20) + ENOTEMPTY* = cint(66) + ENOTSOCK* = cint(38) + ENOTSUP* = cint(45) + ENOTTY* = cint(25) + ENXIO* = cint(6) + EOPNOTSUPP* = cint(102) + EOVERFLOW* = cint(84) + EPERM* = cint(1) + EPIPE* = cint(32) + EPROTO* = cint(100) + EPROTONOSUPPORT* = cint(43) + EPROTOTYPE* = cint(41) + ERANGE* = cint(34) + EROFS* = cint(30) + ESPIPE* = cint(29) + ESRCH* = cint(3) + ESTALE* = cint(70) + ETIME* = cint(101) + ETIMEDOUT* = cint(60) + ETXTBSY* = cint(26) + EWOULDBLOCK* = cint(35) + EXDEV* = cint(18) + F_DUPFD* = cint(0) + F_GETFD* = cint(1) + F_SETFD* = cint(2) + F_GETFL* = cint(3) + F_SETFL* = cint(4) + F_GETLK* = cint(7) + F_SETLK* = cint(8) + F_SETLKW* = cint(9) + F_GETOWN* = cint(5) + F_SETOWN* = cint(6) + FD_CLOEXEC* = cint(1) + F_RDLCK* = cint(1) + F_UNLCK* = cint(2) + F_WRLCK* = cint(3) + O_CREAT* = cint(512) + O_EXCL* = cint(2048) + O_NOCTTY* = cint(131072) + O_TRUNC* = cint(1024) + O_APPEND* = cint(8) + O_DSYNC* = cint(4194304) + O_NONBLOCK* = cint(4) + O_SYNC* = cint(128) + O_ACCMODE* = cint(3) + O_RDONLY* = cint(0) + O_RDWR* = cint(2) + O_WRONLY* = cint(1) + FE_DIVBYZERO* = cint(4) + FE_INEXACT* = cint(32) + FE_INVALID* = cint(1) + FE_OVERFLOW* = cint(8) + FE_UNDERFLOW* = cint(16) + FE_ALL_EXCEPT* = cint(63) + FE_DOWNWARD* = cint(1024) + FE_TONEAREST* = cint(0) + FE_TOWARDZERO* = cint(3072) + FE_UPWARD* = cint(2048) + FE_DFL_ENV* = when defined(amd64): cast[pointer](0x7fff9533b1b4) + else: cast[pointer](0x904797f4) + MM_HARD* = cint(1) + MM_SOFT* = cint(2) + MM_FIRM* = cint(4) + MM_APPL* = cint(16) + MM_UTIL* = cint(32) + MM_OPSYS* = cint(64) + MM_RECOVER* = cint(4096) + MM_NRECOV* = cint(8192) + MM_HALT* = cint(1) + MM_ERROR* = cint(2) + MM_WARNING* = cint(3) + MM_INFO* = cint(4) + MM_NOSEV* = cint(0) + MM_PRINT* = cint(256) + MM_CONSOLE* = cint(512) + MM_OK* = cint(0) + MM_NOTOK* = cint(3) + MM_NOMSG* = cint(1) + MM_NOCON* = cint(2) + FNM_NOMATCH* = cint(1) + FNM_PATHNAME* = cint(2) + FNM_PERIOD* = cint(4) + FNM_NOESCAPE* = cint(1) + FNM_NOSYS* = cint(-1) + FTW_F* = cint(0) + FTW_D* = cint(1) + FTW_DNR* = cint(2) + FTW_DP* = cint(3) + FTW_NS* = cint(4) + FTW_SL* = cint(5) + FTW_SLN* = cint(6) + FTW_PHYS* = cint(1) + FTW_MOUNT* = cint(2) + FTW_DEPTH* = cint(4) + FTW_CHDIR* = cint(8) + GLOB_APPEND* = cint(1) + GLOB_DOOFFS* = cint(2) + GLOB_ERR* = cint(4) + GLOB_MARK* = cint(8) + GLOB_NOCHECK* = cint(16) + GLOB_NOESCAPE* = cint(8192) + GLOB_NOSORT* = cint(32) + GLOB_ABORTED* = cint(-2) + GLOB_NOMATCH* = cint(-3) + GLOB_NOSPACE* = cint(-1) + GLOB_NOSYS* = cint(-4) + CODESET* = cint(0) + D_T_FMT* = cint(1) + D_FMT* = cint(2) + T_FMT* = cint(3) + T_FMT_AMPM* = cint(4) + AM_STR* = cint(5) + PM_STR* = cint(6) + DAY_1* = cint(7) + DAY_2* = cint(8) + DAY_3* = cint(9) + DAY_4* = cint(10) + DAY_5* = cint(11) + DAY_6* = cint(12) + DAY_7* = cint(13) + ABDAY_1* = cint(14) + ABDAY_2* = cint(15) + ABDAY_3* = cint(16) + ABDAY_4* = cint(17) + ABDAY_5* = cint(18) + ABDAY_6* = cint(19) + ABDAY_7* = cint(20) + MON_1* = cint(21) + MON_2* = cint(22) + MON_3* = cint(23) + MON_4* = cint(24) + MON_5* = cint(25) + MON_6* = cint(26) + MON_7* = cint(27) + MON_8* = cint(28) + MON_9* = cint(29) + MON_10* = cint(30) + MON_11* = cint(31) + MON_12* = cint(32) + ABMON_1* = cint(33) + ABMON_2* = cint(34) + ABMON_3* = cint(35) + ABMON_4* = cint(36) + ABMON_5* = cint(37) + ABMON_6* = cint(38) + ABMON_7* = cint(39) + ABMON_8* = cint(40) + ABMON_9* = cint(41) + ABMON_10* = cint(42) + ABMON_11* = cint(43) + ABMON_12* = cint(44) + ERA* = cint(45) + ERA_D_FMT* = cint(46) + ERA_D_T_FMT* = cint(47) + ERA_T_FMT* = cint(48) + ALT_DIGITS* = cint(49) + RADIXCHAR* = cint(50) + THOUSEP* = cint(51) + YESEXPR* = cint(52) + NOEXPR* = cint(53) + CRNCYSTR* = cint(56) + LC_ALL* = cint(0) + LC_COLLATE* = cint(1) + LC_CTYPE* = cint(2) + LC_MESSAGES* = cint(6) + LC_MONETARY* = cint(3) + LC_NUMERIC* = cint(4) + LC_TIME* = cint(5) + PTHREAD_CANCEL_ASYNCHRONOUS* = cint(0) + PTHREAD_CANCEL_ENABLE* = cint(1) + PTHREAD_CANCEL_DEFERRED* = cint(2) + PTHREAD_CANCEL_DISABLE* = cint(0) + PTHREAD_CREATE_DETACHED* = cint(2) + PTHREAD_CREATE_JOINABLE* = cint(1) + PTHREAD_EXPLICIT_SCHED* = cint(2) + PTHREAD_INHERIT_SCHED* = cint(1) + PTHREAD_MUTEX_DEFAULT* = cint(0) + PTHREAD_MUTEX_ERRORCHECK* = cint(1) + PTHREAD_MUTEX_NORMAL* = cint(0) + PTHREAD_MUTEX_RECURSIVE* = cint(2) + PTHREAD_PRIO_INHERIT* = cint(1) + PTHREAD_PRIO_NONE* = cint(0) + PTHREAD_PRIO_PROTECT* = cint(2) + PTHREAD_PROCESS_SHARED* = cint(1) + PTHREAD_PROCESS_PRIVATE* = cint(2) + PTHREAD_SCOPE_PROCESS* = cint(2) + PTHREAD_SCOPE_SYSTEM* = cint(1) + F_OK* = cint(0) + R_OK* = cint(4) + W_OK* = cint(2) + X_OK* = cint(1) + CS_PATH* = cint(1) + CS_POSIX_V6_ILP32_OFF32_CFLAGS* = cint(2) + CS_POSIX_V6_ILP32_OFF32_LDFLAGS* = cint(3) + CS_POSIX_V6_ILP32_OFF32_LIBS* = cint(4) + CS_POSIX_V6_ILP32_OFFBIG_CFLAGS* = cint(5) + CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS* = cint(6) + CS_POSIX_V6_ILP32_OFFBIG_LIBS* = cint(7) + CS_POSIX_V6_LP64_OFF64_CFLAGS* = cint(8) + CS_POSIX_V6_LP64_OFF64_LDFLAGS* = cint(9) + CS_POSIX_V6_LP64_OFF64_LIBS* = cint(10) + CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS* = cint(11) + CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS* = cint(12) + CS_POSIX_V6_LPBIG_OFFBIG_LIBS* = cint(13) + CS_POSIX_V6_WIDTH_RESTRICTED_ENVS* = cint(14) + F_LOCK* = cint(1) + F_TEST* = cint(3) + F_TLOCK* = cint(2) + F_ULOCK* = cint(0) + PC_2_SYMLINKS* = cint(15) + PC_ALLOC_SIZE_MIN* = cint(16) + PC_ASYNC_IO* = cint(17) + PC_CHOWN_RESTRICTED* = cint(7) + PC_FILESIZEBITS* = cint(18) + PC_LINK_MAX* = cint(1) + PC_MAX_CANON* = cint(2) + PC_MAX_INPUT* = cint(3) + PC_NAME_MAX* = cint(4) + PC_NO_TRUNC* = cint(8) + PC_PATH_MAX* = cint(5) + PC_PIPE_BUF* = cint(6) + PC_PRIO_IO* = cint(19) + PC_REC_INCR_XFER_SIZE* = cint(20) + PC_REC_MIN_XFER_SIZE* = cint(22) + PC_REC_XFER_ALIGN* = cint(23) + PC_SYMLINK_MAX* = cint(24) + PC_SYNC_IO* = cint(25) + PC_VDISABLE* = cint(9) + SC_2_C_BIND* = cint(18) + SC_2_C_DEV* = cint(19) + SC_2_CHAR_TERM* = cint(20) + SC_2_FORT_DEV* = cint(21) + SC_2_FORT_RUN* = cint(22) + SC_2_LOCALEDEF* = cint(23) + SC_2_PBS* = cint(59) + SC_2_PBS_ACCOUNTING* = cint(60) + SC_2_PBS_CHECKPOINT* = cint(61) + SC_2_PBS_LOCATE* = cint(62) + SC_2_PBS_MESSAGE* = cint(63) + SC_2_PBS_TRACK* = cint(64) + SC_2_SW_DEV* = cint(24) + SC_2_UPE* = cint(25) + SC_2_VERSION* = cint(17) + SC_ADVISORY_INFO* = cint(65) + SC_AIO_LISTIO_MAX* = cint(42) + SC_AIO_MAX* = cint(43) + SC_AIO_PRIO_DELTA_MAX* = cint(44) + SC_ARG_MAX* = cint(1) + SC_ASYNCHRONOUS_IO* = cint(28) + SC_ATEXIT_MAX* = cint(107) + SC_BARRIERS* = cint(66) + SC_BC_BASE_MAX* = cint(9) + SC_BC_DIM_MAX* = cint(10) + SC_BC_SCALE_MAX* = cint(11) + SC_BC_STRING_MAX* = cint(12) + SC_CHILD_MAX* = cint(2) + SC_CLK_TCK* = cint(3) + SC_CLOCK_SELECTION* = cint(67) + SC_COLL_WEIGHTS_MAX* = cint(13) + SC_CPUTIME* = cint(68) + SC_DELAYTIMER_MAX* = cint(45) + SC_EXPR_NEST_MAX* = cint(14) + SC_FSYNC* = cint(38) + SC_GETGR_R_SIZE_MAX* = cint(70) + SC_GETPW_R_SIZE_MAX* = cint(71) + SC_HOST_NAME_MAX* = cint(72) + SC_IOV_MAX* = cint(56) + SC_IPV6* = cint(118) + SC_JOB_CONTROL* = cint(6) + SC_LINE_MAX* = cint(15) + SC_LOGIN_NAME_MAX* = cint(73) + SC_MAPPED_FILES* = cint(47) + SC_MEMLOCK* = cint(30) + SC_MEMLOCK_RANGE* = cint(31) + SC_MEMORY_PROTECTION* = cint(32) + SC_MESSAGE_PASSING* = cint(33) + SC_MONOTONIC_CLOCK* = cint(74) + SC_MQ_OPEN_MAX* = cint(46) + SC_MQ_PRIO_MAX* = cint(75) + SC_NGROUPS_MAX* = cint(4) + SC_OPEN_MAX* = cint(5) + SC_PAGE_SIZE* = cint(29) + SC_PRIORITIZED_IO* = cint(34) + SC_PRIORITY_SCHEDULING* = cint(35) + SC_RAW_SOCKETS* = cint(119) + SC_RE_DUP_MAX* = cint(16) + SC_READER_WRITER_LOCKS* = cint(76) + SC_REALTIME_SIGNALS* = cint(36) + SC_REGEXP* = cint(77) + SC_RTSIG_MAX* = cint(48) + SC_SAVED_IDS* = cint(7) + SC_SEM_NSEMS_MAX* = cint(49) + SC_SEM_VALUE_MAX* = cint(50) + SC_SEMAPHORES* = cint(37) + SC_SHARED_MEMORY_OBJECTS* = cint(39) + SC_SHELL* = cint(78) + SC_SIGQUEUE_MAX* = cint(51) + SC_SPAWN* = cint(79) + SC_SPIN_LOCKS* = cint(80) + SC_SPORADIC_SERVER* = cint(81) + SC_SS_REPL_MAX* = cint(126) + SC_STREAM_MAX* = cint(26) + SC_SYMLOOP_MAX* = cint(120) + SC_SYNCHRONIZED_IO* = cint(40) + SC_THREAD_ATTR_STACKADDR* = cint(82) + SC_THREAD_ATTR_STACKSIZE* = cint(83) + SC_THREAD_CPUTIME* = cint(84) + SC_THREAD_DESTRUCTOR_ITERATIONS* = cint(85) + SC_THREAD_KEYS_MAX* = cint(86) + SC_THREAD_PRIO_INHERIT* = cint(87) + SC_THREAD_PRIO_PROTECT* = cint(88) + SC_THREAD_PRIORITY_SCHEDULING* = cint(89) + SC_THREAD_PROCESS_SHARED* = cint(90) + SC_THREAD_SAFE_FUNCTIONS* = cint(91) + SC_THREAD_SPORADIC_SERVER* = cint(92) + SC_THREAD_STACK_MIN* = cint(93) + SC_THREAD_THREADS_MAX* = cint(94) + SC_THREADS* = cint(96) + SC_TIMEOUTS* = cint(95) + SC_TIMER_MAX* = cint(52) + SC_TIMERS* = cint(41) + SC_TRACE* = cint(97) + SC_TRACE_EVENT_FILTER* = cint(98) + SC_TRACE_EVENT_NAME_MAX* = cint(127) + SC_TRACE_INHERIT* = cint(99) + SC_TRACE_LOG* = cint(100) + SC_TRACE_NAME_MAX* = cint(128) + SC_TRACE_SYS_MAX* = cint(129) + SC_TRACE_USER_EVENT_MAX* = cint(130) + SC_TTY_NAME_MAX* = cint(101) + SC_TYPED_MEMORY_OBJECTS* = cint(102) + SC_TZNAME_MAX* = cint(27) + SC_V6_ILP32_OFF32* = cint(103) + SC_V6_ILP32_OFFBIG* = cint(104) + SC_V6_LP64_OFF64* = cint(105) + SC_V6_LPBIG_OFFBIG* = cint(106) + SC_VERSION* = cint(8) + SC_XBS5_ILP32_OFF32* = cint(122) + SC_XBS5_ILP32_OFFBIG* = cint(123) + SC_XBS5_LP64_OFF64* = cint(124) + SC_XBS5_LPBIG_OFFBIG* = cint(125) + SC_XOPEN_CRYPT* = cint(108) + SC_XOPEN_ENH_I18N* = cint(109) + SC_XOPEN_LEGACY* = cint(110) + SC_XOPEN_REALTIME* = cint(111) + SC_XOPEN_REALTIME_THREADS* = cint(112) + SC_XOPEN_SHM* = cint(113) + SC_XOPEN_STREAMS* = cint(114) + SC_XOPEN_UNIX* = cint(115) + SC_XOPEN_VERSION* = cint(116) + SEEK_SET* = cint(0) + SEEK_CUR* = cint(1) + SEEK_END* = cint(2) + SEM_FAILED* = cast[pointer](-1) + IPC_CREAT* = cint(512) + IPC_EXCL* = cint(1024) + IPC_NOWAIT* = cint(2048) + IPC_PRIVATE* = cint(0) + IPC_RMID* = cint(0) + IPC_SET* = cint(1) + IPC_STAT* = cint(2) + S_IFMT* = cint(61440) + S_IFBLK* = cint(24576) + S_IFCHR* = cint(8192) + S_IFIFO* = cint(4096) + S_IFREG* = cint(32768) + S_IFDIR* = cint(16384) + S_IFLNK* = cint(40960) + S_IFSOCK* = cint(49152) + S_IRWXU* = cint(448) + S_IRUSR* = cint(256) + S_IWUSR* = cint(128) + S_IXUSR* = cint(64) + S_IRWXG* = cint(56) + S_IRGRP* = cint(32) + S_IWGRP* = cint(16) + S_IXGRP* = cint(8) + S_IRWXO* = cint(7) + S_IROTH* = cint(4) + S_IWOTH* = cint(2) + S_IXOTH* = cint(1) + S_ISUID* = cint(2048) + S_ISGID* = cint(1024) + S_ISVTX* = cint(512) + ST_RDONLY* = cint(1) + ST_NOSUID* = cint(2) + PROT_READ* = cint(1) + PROT_WRITE* = cint(2) + PROT_EXEC* = cint(4) + PROT_NONE* = cint(0) + MAP_SHARED* = cint(1) + MAP_PRIVATE* = cint(2) + MAP_FIXED* = cint(16) + MS_ASYNC* = cint(1) + MS_SYNC* = cint(16) + MS_INVALIDATE* = cint(2) + MCL_CURRENT* = cint(1) + MCL_FUTURE* = cint(2) + MAP_FAILED* = cast[pointer](-1) + POSIX_MADV_NORMAL* = cint(0) + POSIX_MADV_SEQUENTIAL* = cint(2) + POSIX_MADV_RANDOM* = cint(1) + POSIX_MADV_WILLNEED* = cint(3) + POSIX_MADV_DONTNEED* = cint(4) + CLOCKS_PER_SEC* = clong(1000000) + WNOHANG* = cint(1) + WUNTRACED* = cint(2) + WEXITED* = cint(4) + WSTOPPED* = cint(8) + WCONTINUED* = cint(16) + WNOWAIT* = cint(32) + SIGEV_NONE* = cint(0) + SIGEV_SIGNAL* = cint(1) + SIGEV_THREAD* = cint(3) + SIGABRT* = cint(6) + SIGALRM* = cint(14) + SIGBUS* = cint(10) + SIGCHLD* = cint(20) + SIGCONT* = cint(19) + SIGFPE* = cint(8) + SIGHUP* = cint(1) + SIGILL* = cint(4) + SIGINT* = cint(2) + SIGKILL* = cint(9) + SIGPIPE* = cint(13) + SIGQUIT* = cint(3) + SIGSEGV* = cint(11) + SIGSTOP* = cint(17) + SIGTERM* = cint(15) + SIGTSTP* = cint(18) + SIGTTIN* = cint(21) + SIGTTOU* = cint(22) + SIGUSR1* = cint(30) + SIGUSR2* = cint(31) + SIGPROF* = cint(27) + SIGSYS* = cint(12) + SIGTRAP* = cint(5) + SIGURG* = cint(16) + SIGVTALRM* = cint(26) + SIGXCPU* = cint(24) + SIGXFSZ* = cint(25) + SA_NOCLDSTOP* = cint(8) + SIG_BLOCK* = cint(1) + SIG_UNBLOCK* = cint(2) + SIG_SETMASK* = cint(3) + SA_ONSTACK* = cint(1) + SA_RESETHAND* = cint(4) + SA_RESTART* = cint(2) + SA_SIGINFO* = cint(64) + SA_NOCLDWAIT* = cint(32) + SA_NODEFER* = cint(16) + SS_ONSTACK* = cint(1) + SS_DISABLE* = cint(4) + MINSIGSTKSZ* = cint(32768) + SIGSTKSZ* = cint(131072) + NL_SETD* = cint(1) + NL_CAT_LOCALE* = cint(1) + SCHED_FIFO* = cint(4) + SCHED_RR* = cint(2) + SCHED_OTHER* = cint(1) + FD_SETSIZE* = cint(1024) + SCM_RIGHTS* = cint(1) + SOCK_DGRAM* = cint(2) + SOCK_RAW* = cint(3) + SOCK_SEQPACKET* = cint(5) + SOCK_STREAM* = cint(1) + SOL_SOCKET* = cint(65535) + SO_ACCEPTCONN* = cint(2) + SO_BROADCAST* = cint(32) + SO_DEBUG* = cint(1) + SO_DONTROUTE* = cint(16) + SO_ERROR* = cint(4103) + SO_KEEPALIVE* = cint(8) + SO_LINGER* = cint(128) + SO_OOBINLINE* = cint(256) + SO_RCVBUF* = cint(4098) + SO_RCVLOWAT* = cint(4100) + SO_RCVTIMEO* = cint(4102) + SO_REUSEADDR* = cint(4) + SO_SNDBUF* = cint(4097) + SO_SNDLOWAT* = cint(4099) + SO_SNDTIMEO* = cint(4101) + SO_TYPE* = cint(4104) + SOMAXCONN* = cint(128) + MSG_CTRUNC* = cint(32) + MSG_DONTROUTE* = cint(4) + MSG_EOR* = cint(8) + MSG_OOB* = cint(1) + MSG_PEEK* = cint(2) + MSG_TRUNC* = cint(16) + MSG_WAITALL* = cint(64) + AF_INET* = cint(2) + AF_INET6* = cint(30) + AF_UNIX* = cint(1) + AF_UNSPEC* = cint(0) + SHUT_RD* = cint(0) + SHUT_RDWR* = cint(2) + SHUT_WR* = cint(1) + IPPROTO_IP* = cint(0) + IPPROTO_IPV6* = cint(41) + IPPROTO_ICMP* = cint(1) + IPPROTO_RAW* = cint(255) + IPPROTO_TCP* = cint(6) + IPPROTO_UDP* = cint(17) + INADDR_ANY* = cint(0) + INADDR_BROADCAST* = cint(-1) + INET_ADDRSTRLEN* = cint(16) + IPV6_JOIN_GROUP* = cint(12) + IPV6_LEAVE_GROUP* = cint(13) + IPV6_MULTICAST_HOPS* = cint(10) + IPV6_MULTICAST_IF* = cint(9) + IPV6_MULTICAST_LOOP* = cint(11) + IPV6_UNICAST_HOPS* = cint(4) + IPV6_V6ONLY* = cint(27) + IPPORT_RESERVED* = cint(1024) + HOST_NOT_FOUND* = cint(1) + NO_DATA* = cint(4) + NO_RECOVERY* = cint(3) + TRY_AGAIN* = cint(2) + AI_PASSIVE* = cint(1) + AI_CANONNAME* = cint(2) + AI_NUMERICHOST* = cint(4) + AI_NUMERICSERV* = cint(4096) + AI_V4MAPPED* = cint(2048) + AI_ALL* = cint(256) + AI_ADDRCONFIG* = cint(1024) + NI_NOFQDN* = cint(1) + NI_NUMERICHOST* = cint(2) + NI_NAMEREQD* = cint(4) + NI_NUMERICSERV* = cint(8) + NI_DGRAM* = cint(16) + EAI_AGAIN* = cint(2) + EAI_BADFLAGS* = cint(3) + EAI_FAIL* = cint(4) + EAI_FAMILY* = cint(5) + EAI_MEMORY* = cint(6) + EAI_NONAME* = cint(8) + EAI_SERVICE* = cint(9) + EAI_SOCKTYPE* = cint(10) + EAI_SYSTEM* = cint(11) + EAI_OVERFLOW* = cint(14) + POLLIN* = cshort(1) + POLLRDNORM* = cshort(64) + POLLRDBAND* = cshort(128) + POLLPRI* = cshort(2) + POLLOUT* = cshort(4) + POLLWRNORM* = cshort(4) + POLLWRBAND* = cshort(256) + POLLERR* = cshort(8) + POLLHUP* = cshort(16) + POLLNVAL* = cshort(32) + POSIX_SPAWN_RESETIDS* = cint(1) + POSIX_SPAWN_SETPGROUP* = cint(2) + POSIX_SPAWN_SETSIGDEF* = cint(4) + POSIX_SPAWN_SETSIGMASK* = cint(8) + IOFBF* = cint(0) + IONBF* = cint(2) + diff --git a/tools/detect/windows_amd64_consts.nim b/tools/detect/windows_amd64_consts.nim new file mode 100644 index 000000000..d72c9786d --- /dev/null +++ b/tools/detect/windows_amd64_consts.nim @@ -0,0 +1,152 @@ +# Generated by detect.nim +const + E2BIG* = cint(7) + EACCES* = cint(13) + EADDRINUSE* = cint(100) + EADDRNOTAVAIL* = cint(101) + EAFNOSUPPORT* = cint(102) + EAGAIN* = cint(11) + EALREADY* = cint(103) + EBADF* = cint(9) + EBUSY* = cint(16) + ECANCELED* = cint(105) + ECHILD* = cint(10) + ECONNABORTED* = cint(106) + ECONNREFUSED* = cint(107) + ECONNRESET* = cint(108) + EDEADLK* = cint(36) + EDESTADDRREQ* = cint(109) + EDOM* = cint(33) + EEXIST* = cint(17) + EFAULT* = cint(14) + EFBIG* = cint(27) + EHOSTUNREACH* = cint(110) + EILSEQ* = cint(42) + EINPROGRESS* = cint(112) + EINTR* = cint(4) + EINVAL* = cint(22) + EIO* = cint(5) + EISCONN* = cint(113) + EISDIR* = cint(21) + ELOOP* = cint(114) + EMFILE* = cint(24) + EMLINK* = cint(31) + EMSGSIZE* = cint(115) + ENAMETOOLONG* = cint(38) + ENETDOWN* = cint(116) + ENETRESET* = cint(117) + ENETUNREACH* = cint(118) + ENFILE* = cint(23) + ENOBUFS* = cint(119) + ENODEV* = cint(19) + ENOENT* = cint(2) + ENOEXEC* = cint(8) + ENOLCK* = cint(39) + ENOMEM* = cint(12) + ENOPROTOOPT* = cint(123) + ENOSPC* = cint(28) + ENOSYS* = cint(40) + ENOTCONN* = cint(126) + ENOTDIR* = cint(20) + ENOTEMPTY* = cint(41) + ENOTSOCK* = cint(128) + ENOTSUP* = cint(129) + ENOTTY* = cint(25) + ENXIO* = cint(6) + EOPNOTSUPP* = cint(130) + EOVERFLOW* = cint(132) + EPERM* = cint(1) + EPIPE* = cint(32) + EPROTO* = cint(134) + EPROTONOSUPPORT* = cint(135) + EPROTOTYPE* = cint(136) + ERANGE* = cint(34) + EROFS* = cint(30) + ESPIPE* = cint(29) + ESRCH* = cint(3) + ETIMEDOUT* = cint(138) + EWOULDBLOCK* = cint(140) + EXDEV* = cint(18) + O_CREAT* = cint(256) + O_EXCL* = cint(1024) + O_TRUNC* = cint(512) + O_APPEND* = cint(8) + O_ACCMODE* = cint(3) + O_RDONLY* = cint(0) + O_RDWR* = cint(2) + O_WRONLY* = cint(1) + FE_DIVBYZERO* = cint(4) + FE_INEXACT* = cint(32) + FE_INVALID* = cint(1) + FE_OVERFLOW* = cint(8) + FE_UNDERFLOW* = cint(16) + FE_ALL_EXCEPT* = cint(63) + FE_DOWNWARD* = cint(1024) + FE_TONEAREST* = cint(0) + FE_TOWARDZERO* = cint(3072) + FE_UPWARD* = cint(2048) + FE_DFL_ENV* = pointer(nil) + LC_ALL* = cint(0) + LC_COLLATE* = cint(1) + LC_CTYPE* = cint(2) + LC_MONETARY* = cint(3) + LC_NUMERIC* = cint(4) + LC_TIME* = cint(5) + PTHREAD_BARRIER_SERIAL_THREAD* = cint(1) + PTHREAD_CANCEL_ASYNCHRONOUS* = cint(2) + PTHREAD_CANCEL_ENABLE* = cint(1) + PTHREAD_CANCEL_DEFERRED* = cint(0) + PTHREAD_CANCEL_DISABLE* = cint(0) + PTHREAD_CREATE_DETACHED* = cint(4) + PTHREAD_CREATE_JOINABLE* = cint(0) + PTHREAD_EXPLICIT_SCHED* = cint(0) + PTHREAD_INHERIT_SCHED* = cint(8) + PTHREAD_MUTEX_DEFAULT* = cint(0) + PTHREAD_MUTEX_ERRORCHECK* = cint(1) + PTHREAD_MUTEX_NORMAL* = cint(0) + PTHREAD_MUTEX_RECURSIVE* = cint(2) + PTHREAD_PRIO_INHERIT* = cint(8) + PTHREAD_PRIO_NONE* = cint(0) + PTHREAD_PRIO_PROTECT* = cint(16) + PTHREAD_PROCESS_SHARED* = cint(1) + PTHREAD_PROCESS_PRIVATE* = cint(0) + PTHREAD_SCOPE_PROCESS* = cint(0) + PTHREAD_SCOPE_SYSTEM* = cint(16) + F_OK* = cint(0) + R_OK* = cint(4) + W_OK* = cint(2) + X_OK* = cint(1) + SEEK_SET* = cint(0) + SEEK_CUR* = cint(1) + SEEK_END* = cint(2) + SEM_FAILED* = pointer(nil) + S_IFMT* = cint(61440) + S_IFBLK* = cint(12288) + S_IFCHR* = cint(8192) + S_IFIFO* = cint(4096) + S_IFREG* = cint(32768) + S_IFDIR* = cint(16384) + S_IRWXU* = cint(448) + S_IRUSR* = cint(256) + S_IWUSR* = cint(128) + S_IXUSR* = cint(64) + CLOCKS_PER_SEC* = clong(1000) + CLOCK_PROCESS_CPUTIME_ID* = cint(2) + CLOCK_THREAD_CPUTIME_ID* = cint(3) + CLOCK_REALTIME* = cint(0) + TIMER_ABSTIME* = cint(1) + CLOCK_MONOTONIC* = cint(1) + SIGABRT* = cint(22) + SIGFPE* = cint(8) + SIGILL* = cint(4) + SIGINT* = cint(2) + SIGSEGV* = cint(11) + SIGTERM* = cint(15) + SIG_BLOCK* = cint(0) + SIG_UNBLOCK* = cint(1) + SIG_SETMASK* = cint(2) + SCHED_FIFO* = cint(1) + SCHED_RR* = cint(2) + SCHED_OTHER* = cint(0) + IOFBF* = cint(0) + IONBF* = cint(4) diff --git a/tools/detect/windows_i386_consts.nim b/tools/detect/windows_i386_consts.nim new file mode 100644 index 000000000..cd6c475f4 --- /dev/null +++ b/tools/detect/windows_i386_consts.nim @@ -0,0 +1,96 @@ +# Generated by detect.nim +const + E2BIG* = cint(7) + EACCES* = cint(13) + EAGAIN* = cint(11) + EBADF* = cint(9) + EBUSY* = cint(16) + ECHILD* = cint(10) + EDEADLK* = cint(36) + EDOM* = cint(33) + EEXIST* = cint(17) + EFAULT* = cint(14) + EFBIG* = cint(27) + EILSEQ* = cint(42) + EINTR* = cint(4) + EINVAL* = cint(22) + EIO* = cint(5) + EISDIR* = cint(21) + EMFILE* = cint(24) + EMLINK* = cint(31) + ENAMETOOLONG* = cint(38) + ENFILE* = cint(23) + ENODEV* = cint(19) + ENOENT* = cint(2) + ENOEXEC* = cint(8) + ENOLCK* = cint(39) + ENOMEM* = cint(12) + ENOSPC* = cint(28) + ENOSYS* = cint(40) + ENOTDIR* = cint(20) + ENOTEMPTY* = cint(41) + ENOTSUP* = cint(48) + ENOTTY* = cint(25) + ENXIO* = cint(6) + EPERM* = cint(1) + EPIPE* = cint(32) + ERANGE* = cint(34) + EROFS* = cint(30) + ESPIPE* = cint(29) + ESRCH* = cint(3) + ETIMEDOUT* = cint(10060) + EXDEV* = cint(18) + O_CREAT* = cint(256) + O_EXCL* = cint(1024) + O_TRUNC* = cint(512) + O_APPEND* = cint(8) + O_ACCMODE* = cint(3) + O_RDONLY* = cint(0) + O_RDWR* = cint(2) + O_WRONLY* = cint(1) + FE_DIVBYZERO* = cint(4) + FE_INEXACT* = cint(32) + FE_INVALID* = cint(1) + FE_OVERFLOW* = cint(8) + FE_UNDERFLOW* = cint(16) + FE_ALL_EXCEPT* = cint(63) + FE_DOWNWARD* = cint(1024) + FE_TONEAREST* = cint(0) + FE_TOWARDZERO* = cint(3072) + FE_UPWARD* = cint(2048) + FE_DFL_ENV* = pointer(nil) + LC_ALL* = cint(0) + LC_COLLATE* = cint(1) + LC_CTYPE* = cint(2) + LC_MONETARY* = cint(3) + LC_NUMERIC* = cint(4) + LC_TIME* = cint(5) + F_OK* = cint(0) + R_OK* = cint(4) + W_OK* = cint(2) + X_OK* = cint(1) + SEEK_SET* = cint(0) + SEEK_CUR* = cint(1) + SEEK_END* = cint(2) + S_IFMT* = cint(61440) + S_IFBLK* = cint(12288) + S_IFCHR* = cint(8192) + S_IFIFO* = cint(4096) + S_IFREG* = cint(32768) + S_IFDIR* = cint(16384) + S_IRWXU* = cint(448) + S_IRUSR* = cint(256) + S_IWUSR* = cint(128) + S_IXUSR* = cint(64) + CLOCKS_PER_SEC* = clong(1000) + SIGABRT* = cint(22) + SIGFPE* = cint(8) + SIGILL* = cint(4) + SIGINT* = cint(2) + SIGSEGV* = cint(11) + SIGTERM* = cint(15) + SIG_BLOCK* = cint(0) + SIG_UNBLOCK* = cint(1) + SIG_SETMASK* = cint(2) + IOFBF* = cint(0) + IONBF* = cint(4) -- cgit 1.4.1-2-gfad0