From 97cf41dfee1463344bddc46f6ed6fea9b966418b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 31 Oct 2014 07:46:35 -0600 Subject: [PATCH] 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 --- pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/pixbuf.rkt | 4 ++-- pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/win32.rkt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/pixbuf.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/pixbuf.rkt index d5c2733c..c875a4fe 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/pixbuf.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/pixbuf.rkt @@ -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) diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/win32.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/win32.rkt index a7414899..2ca6e23d 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/win32.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wx/gtk/win32.rkt @@ -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)