less Windows special cases now that ffi-lib #f searches MzScheme DLL
svn: r3513
This commit is contained in:
parent
fd00f718cf
commit
5eb65a0c32
|
@ -2,11 +2,6 @@
|
|||
(require (lib "etc.ss")
|
||||
(lib "foreign.ss")) (unsafe!)
|
||||
|
||||
(define msvcrt
|
||||
(if (eq? 'windows (system-type))
|
||||
(delay (ffi-lib "msvcrt"))
|
||||
(delay #f)))
|
||||
|
||||
(define kernel32
|
||||
(delay (and (eq? 'windows (system-type))
|
||||
(ffi-lib "kernel32"))))
|
||||
|
@ -93,18 +88,18 @@
|
|||
|
||||
;; open : string int -> int
|
||||
(define open
|
||||
(delay-ffi-obj (winize "open") (force msvcrt)
|
||||
(delay-ffi-obj (winize "open") #f
|
||||
(_fun _string _int -> _int)))
|
||||
|
||||
;; close : int -> int
|
||||
(define close
|
||||
(delay-ffi-obj (winize "close") (force msvcrt)
|
||||
(delay-ffi-obj (winize "close") #f
|
||||
(_fun _int -> _int)))
|
||||
|
||||
;; ftruncate : int int -> int
|
||||
(define ftruncate
|
||||
(if (eq? 'windows (system-type))
|
||||
(delay-ffi-obj "_chsize" (force msvcrt)
|
||||
(delay-ffi-obj "_chsize" #f
|
||||
(_fun _int _llong -> _int))
|
||||
(delay-ffi-obj "ftruncate" #f
|
||||
(_fun _int _llong -> _int))))
|
||||
|
|
|
@ -52,12 +52,6 @@
|
|||
|
||||
(define ssl-load-fail-reason #f)
|
||||
|
||||
(define (ffi-lib-xxxxxxx name)
|
||||
(let* ([f (format "~a~a" name filename-version-part)])
|
||||
(or (with-handlers ([exn? (lambda (x) #f)])
|
||||
(ffi-lib (format "~a~a" name filename-version-part)))
|
||||
(ffi-lib (format "~axxxxxxx" name)))))
|
||||
|
||||
(define 3m? (regexp-match #rx#"3m" (path->bytes (system-library-subpath))))
|
||||
|
||||
(define libcrypto
|
||||
|
@ -81,11 +75,7 @@
|
|||
[else
|
||||
(ffi-lib "libssl")]))))
|
||||
|
||||
(define libmz
|
||||
(case (system-type)
|
||||
[(windows)
|
||||
(ffi-lib-xxxxxxx (format "libmzsch~a" (if 3m? "3m" "")))]
|
||||
[else #f]))
|
||||
(define libmz (ffi-lib #f))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; SSL bindings and constants
|
||||
|
|
Loading…
Reference in New Issue
Block a user