Windows DLLs no longer version-mangled
svn: r2777
This commit is contained in:
parent
1283d749a5
commit
5b52f5fac7
|
@ -56,15 +56,25 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ([m (regexp-match #rx#"dLl dIRECTORy:([^\0]*)\0" (current-input-port))])
|
(let ([m (regexp-match #rx#"dLl dIRECTORy:([^\0]*)\0" (current-input-port))])
|
||||||
(unless m (error "cannot find DLL directory"))
|
(unless m (error "cannot find DLL directory"))
|
||||||
(let-values ([(dir name dir?) (split-path exe)])
|
(if (regexp-match #rx#"^<" (cadr m))
|
||||||
(build-path dir (bytes->path (cadr m))))))))))
|
#f ; no lib dir
|
||||||
|
(let-values ([(dir name dir?) (split-path exe)])
|
||||||
|
(build-path dir (bytes->path (cadr m)))))))))))
|
||||||
|
|
||||||
|
(define (ffi-lib-win name)
|
||||||
|
(let* ([d (force windows-lib-dir)]
|
||||||
|
[f (and d (build-path d (format "~a.dll" name)))])
|
||||||
|
;; Try PLT-specific lib:
|
||||||
|
(if (and f (file-exists? f))
|
||||||
|
(ffi-lib f)
|
||||||
|
;; Try system-wide:
|
||||||
|
(ffi-lib (format "~a.dll" name)))))
|
||||||
|
|
||||||
(define (ffi-lib-xxxxxxx name)
|
(define (ffi-lib-xxxxxxx name)
|
||||||
(let* ([d (force windows-lib-dir)]
|
(let* ([f (format "~a~a" name filename-version-part)])
|
||||||
[f (build-path d (format "~a~a.dll" name filename-version-part))])
|
(or (with-handlers ([exn? (lambda (x) #f)])
|
||||||
(if (file-exists? f)
|
(ffi-lib-win (format "~a~a" name filename-version-part)))
|
||||||
(ffi-lib f)
|
(ffi-lib-win (format "~axxxxxxx" name)))))
|
||||||
(ffi-lib (build-path d (format "~axxxxxxx.dll" name))))))
|
|
||||||
|
|
||||||
(define 3m? (regexp-match #rx#"3m" (path->bytes (system-library-subpath))))
|
(define 3m? (regexp-match #rx#"3m" (path->bytes (system-library-subpath))))
|
||||||
|
|
||||||
|
@ -74,7 +84,7 @@
|
||||||
#f)])
|
#f)])
|
||||||
(case (system-type)
|
(case (system-type)
|
||||||
[(windows)
|
[(windows)
|
||||||
(ffi-lib-xxxxxxx "libeay32")]
|
(ffi-lib-win "libeay32")]
|
||||||
[else
|
[else
|
||||||
(ffi-lib "libssl")])))
|
(ffi-lib "libssl")])))
|
||||||
|
|
||||||
|
@ -85,7 +95,7 @@
|
||||||
(case (system-type)
|
(case (system-type)
|
||||||
[(windows)
|
[(windows)
|
||||||
(and libeay
|
(and libeay
|
||||||
(ffi-lib-xxxxxxx "ssleay32"))]
|
(ffi-lib-win "ssleay32"))]
|
||||||
[else
|
[else
|
||||||
libeay])))
|
libeay])))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user