some fixes for win64
This commit is contained in:
parent
96529063bf
commit
67e9f2861e
2 changed files with 9 additions and 4 deletions
|
|
@ -1605,8 +1605,8 @@ when defined(Windows):
|
||||||
const
|
const
|
||||||
IOCPARM_MASK = 127
|
IOCPARM_MASK = 127
|
||||||
IOC_IN = int(-2147483648)
|
IOC_IN = int(-2147483648)
|
||||||
FIONBIO = int(IOC_IN or ((sizeof(int) and IOCPARM_MASK) shl 16) or
|
FIONBIO = IOC_IN.int32 or ((sizeof(int32) and IOCPARM_MASK) shl 16) or
|
||||||
(102 shl 8) or 126)
|
(102 shl 8) or 126
|
||||||
|
|
||||||
proc ioctlsocket(s: TWinSocket, cmd: clong,
|
proc ioctlsocket(s: TWinSocket, cmd: clong,
|
||||||
argptr: ptr clong): cint {.
|
argptr: ptr clong): cint {.
|
||||||
|
|
|
||||||
|
|
@ -998,6 +998,13 @@ type
|
||||||
## compiler supports. Currently this is ``float64``, but it is
|
## compiler supports. Currently this is ``float64``, but it is
|
||||||
## platform-dependant in general.
|
## platform-dependant in general.
|
||||||
|
|
||||||
|
when defined(windows):
|
||||||
|
type clong* {.importc: "long", nodecl.} = int32
|
||||||
|
## This is the same as the type ``long`` in *C*.
|
||||||
|
else:
|
||||||
|
type clong* {.importc: "long", nodecl.} = int
|
||||||
|
## This is the same as the type ``long`` in *C*.
|
||||||
|
|
||||||
type # these work for most platforms:
|
type # these work for most platforms:
|
||||||
cchar* {.importc: "char", nodecl.} = char
|
cchar* {.importc: "char", nodecl.} = char
|
||||||
## This is the same as the type ``char`` in *C*.
|
## This is the same as the type ``char`` in *C*.
|
||||||
|
|
@ -1009,8 +1016,6 @@ type # these work for most platforms:
|
||||||
## This is the same as the type ``int`` in *C*.
|
## This is the same as the type ``int`` in *C*.
|
||||||
csize* {.importc: "size_t", nodecl.} = int
|
csize* {.importc: "size_t", nodecl.} = int
|
||||||
## This is the same as the type ``size_t`` in *C*.
|
## This is the same as the type ``size_t`` in *C*.
|
||||||
clong* {.importc: "long", nodecl.} = int
|
|
||||||
## This is the same as the type ``long`` in *C*.
|
|
||||||
clonglong* {.importc: "long long", nodecl.} = int64
|
clonglong* {.importc: "long long", nodecl.} = int64
|
||||||
## This is the same as the type ``long long`` in *C*.
|
## This is the same as the type ``long long`` in *C*.
|
||||||
cfloat* {.importc: "float", nodecl.} = float32
|
cfloat* {.importc: "float", nodecl.} = float32
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue