add ffi/winapi; use it in mzlib/os
Closes PR 12007 original commit: 59731368fc7d90c1177c60ade3ec1f8c4fb0a4ae
This commit is contained in:
parent
f1b2ecf4aa
commit
371f2ca494
|
@ -1,5 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require ffi/unsafe)
|
(require ffi/unsafe
|
||||||
|
ffi/winapi)
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
(protect-out _wfun
|
(protect-out _wfun
|
||||||
|
@ -50,11 +51,8 @@
|
||||||
MAKELONG
|
MAKELONG
|
||||||
MAKELPARAM))
|
MAKELPARAM))
|
||||||
|
|
||||||
(define win64? (equal? "win32\\x86_64" (path->string (system-library-subpath #f))))
|
|
||||||
(define win_abi (if win64? #f 'stdcall))
|
|
||||||
|
|
||||||
(define-syntax-rule (_wfun . a)
|
(define-syntax-rule (_wfun . a)
|
||||||
(_fun #:abi win_abi . a))
|
(_fun #:abi winapi . a))
|
||||||
|
|
||||||
(define _WORD _int16)
|
(define _WORD _int16)
|
||||||
(define _DWORD _int32)
|
(define _DWORD _int32)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user