restore Cygwin support

Fix various configuration problems, and make the build work with 3m
(probably for the first time).

The repairs include corrections for the manual link table, but also
switch Cygwin to relying on normal DLL exports, instead, to work
properly with the FFI.

The `--enable-shared` comfiguration option is no longer required for
Cygwin. When it is used, the `gracket` launcher does not work right,
because the Cygwin DLL is in the "bin" directory and "gracket.exe" is
in the "lib" directory. Along similar lines, stand-alone executables
won't work with `--enable-shared`.

The change to `ffi/winapi` makes it match the documentation.

original commit: cceda78374d94645f2083503371ca43b32b3b10e
This commit is contained in:
Matthew Flatt 2014-10-31 07:46:35 -06:00
parent 0dd2719219
commit 97cf41dfee
2 changed files with 5 additions and 4 deletions

View File

@ -37,8 +37,8 @@
#:wrap (allocator release-pixbuf))
(define-gdk gdk_cairo_set_source_pixbuf (_fun _cairo_t _GdkPixbuf _double* _double* -> _void))
(define-gdk gdk_pixbuf_get_width (_fun _GdkPixbuf -> _int))
(define-gdk gdk_pixbuf_get_height (_fun _GdkPixbuf -> _int))
(define-gdk_pixbuf gdk_pixbuf_get_width (_fun _GdkPixbuf -> _int))
(define-gdk_pixbuf gdk_pixbuf_get_height (_fun _GdkPixbuf -> _int))
(define free-it (ffi-callback free
(list _pointer)

View File

@ -1,6 +1,7 @@
#lang racket/base
(require ffi/unsafe
ffi/unsafe/define
ffi/winapi
"utils.rkt")
(provide gdk_win32_drawable_get_handle
@ -20,7 +21,7 @@
(define-gdk gdk_win32_drawable_get_handle (_fun _GdkDrawable -> _pointer)
#:make-fail make-not-available)
(define-user32 GetDC (_fun #:abi 'stdcall _pointer -> _pointer)
(define-user32 GetDC (_fun #:abi winapi _pointer -> _pointer)
#:make-fail make-not-available)
(define-user32 ReleaseDC (_fun #:abi 'stdcall _pointer -> _void)
(define-user32 ReleaseDC (_fun #:abi winapi _pointer -> _void)
#:make-fail make-not-available)