fix windows test failures
parent
d7a77886b8
commit
0e21c2b81e
|
@ -1,6 +1,6 @@
|
||||||
USING: alien alien.c-types alien.data alien.syntax arrays continuations
|
USING: alien alien.c-types alien.data alien.syntax arrays continuations
|
||||||
destructors generic io.mmap io.ports io.backend.windows io.files.windows
|
destructors generic io.mmap io.ports io.backend.windows io.files.windows
|
||||||
kernel libc math math.bitwise namespaces quotations sequences windows
|
kernel libc locals math math.bitwise namespaces quotations sequences windows
|
||||||
windows.advapi32 windows.kernel32 windows.types io.backend system accessors
|
windows.advapi32 windows.kernel32 windows.types io.backend system accessors
|
||||||
io.backend.windows.privileges classes.struct windows.errors ;
|
io.backend.windows.privileges classes.struct windows.errors ;
|
||||||
IN: io.backend.windows.nt.privileges
|
IN: io.backend.windows.nt.privileges
|
||||||
|
@ -28,17 +28,16 @@ TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
|
||||||
[ f ] dip LUID <struct>
|
[ f ] dip LUID <struct>
|
||||||
[ LookupPrivilegeValue win32-error=0/f ] keep ;
|
[ LookupPrivilegeValue win32-error=0/f ] keep ;
|
||||||
|
|
||||||
: make-token-privileges ( name ? -- obj )
|
:: make-token-privileges ( name enabled? -- obj )
|
||||||
TOKEN_PRIVILEGES <struct>
|
TOKEN_PRIVILEGES <struct>
|
||||||
1 >>PrivilegeCount
|
1 >>PrivilegeCount
|
||||||
LUID_AND_ATTRIBUTES malloc-struct &free
|
LUID_AND_ATTRIBUTES malloc-struct &free
|
||||||
swap [ SE_PRIVILEGE_ENABLED >>Attributes ] when
|
enabled? [ SE_PRIVILEGE_ENABLED >>Attributes ] when
|
||||||
>>Privileges
|
name lookup-privilege >>Luid
|
||||||
[ lookup-privilege ] dip
|
>>Privileges ;
|
||||||
[ Privileges>> (>>Luid) ] keep ;
|
|
||||||
|
|
||||||
M: winnt set-privilege ( name ? -- )
|
M: winnt set-privilege ( name ? -- )
|
||||||
[
|
[
|
||||||
-rot 0 -rot make-token-privileges
|
-rot 0 -rot make-token-privileges
|
||||||
dup length f f AdjustTokenPrivileges win32-error=0/f
|
dup byte-length f f AdjustTokenPrivileges win32-error=0/f
|
||||||
] with-process-token ;
|
] with-process-token ;
|
||||||
|
|
|
@ -11,6 +11,12 @@ TYPEDEF: uchar UCHAR
|
||||||
TYPEDEF: uchar BYTE
|
TYPEDEF: uchar BYTE
|
||||||
|
|
||||||
TYPEDEF: ushort wchar_t
|
TYPEDEF: ushort wchar_t
|
||||||
|
SYMBOL: wchar_t*
|
||||||
|
<<
|
||||||
|
{ char* utf16n } \ wchar_t* typedef
|
||||||
|
wchar_t wchar_t* "pointer-c-type" set-word-prop
|
||||||
|
>>
|
||||||
|
|
||||||
TYPEDEF: wchar_t WCHAR
|
TYPEDEF: wchar_t WCHAR
|
||||||
|
|
||||||
TYPEDEF: short SHORT
|
TYPEDEF: short SHORT
|
||||||
|
@ -70,9 +76,6 @@ TYPEDEF: ulonglong ULARGE_INTEGER
|
||||||
TYPEDEF: LARGE_INTEGER* PLARGE_INTEGER
|
TYPEDEF: LARGE_INTEGER* PLARGE_INTEGER
|
||||||
TYPEDEF: ULARGE_INTEGER* PULARGE_INTEGER
|
TYPEDEF: ULARGE_INTEGER* PULARGE_INTEGER
|
||||||
|
|
||||||
SYMBOL: wchar_t*
|
|
||||||
<< { char* utf16n } \ wchar_t* typedef >>
|
|
||||||
|
|
||||||
TYPEDEF: wchar_t* LPCSTR
|
TYPEDEF: wchar_t* LPCSTR
|
||||||
TYPEDEF: wchar_t* LPWSTR
|
TYPEDEF: wchar_t* LPWSTR
|
||||||
TYPEDEF: WCHAR TCHAR
|
TYPEDEF: WCHAR TCHAR
|
||||||
|
|
Loading…
Reference in New Issue