Unfortunately, we have to jump through hoops to get this to link properly...

Signed-off-by: Jon TURNEY <[email protected]>
---
 configure.ac |    1 +
 os/utils.c   |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9161cba..d8b16fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1553,6 +1553,7 @@ if test "x$XWIN" = xyes; then
                        AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for 
signaling new win32 messages])
                        AC_DEFINE(ROOTLESS,1,[Build Rootless code])
                        CFLAGS="$CFLAGS -DFD_SETSIZE=256"
+                       LDFLAGS="$LDFLAGS -Wl,-enable-stdcall-fixup"
                        ;;
                mingw*)
                        XWIN_SERVER_NAME=Xming
diff --git a/os/utils.c b/os/utils.c
index a41b0cf..48a1801 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -56,6 +56,11 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #ifdef __CYGWIN__
 #include <stdlib.h>
 #include <signal.h>
+/*
+   Sigh... We really need a prototype for this to know it is stdcall,
+   but #include-ing <windows.h> here is not a good idea...
+*/
+__stdcall unsigned long GetTickCount(void);
 #endif
 
 #if defined(WIN32) && !defined(__CYGWIN__)
@@ -424,7 +429,7 @@ GiveUp(int sig)
     errno = olderrno;
 }
 
-#if defined WIN32 && defined __MINGW32__
+#if (defined WIN32 && defined __MINGW32__) || defined(__CYGWIN__)
 CARD32
 GetTimeInMillis (void)
 {
-- 
1.6.0.4

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to