diff options
author | Daniel Glöckner <daniel-gl@gmx.net> | 2016-01-03 18:44:51 (GMT) |
---|---|---|
committer | Daniel Glöckner <daniel-gl@gmx.net> | 2016-01-04 12:06:59 (GMT) |
commit | fcc5a2b60368174d02607862e62b00decb086baa (patch) | |
tree | 744ca979f3803acc9db5a4ef40a7e2f8fadedfa5 /src/libieee1284-4-getversion.patch | |
parent | b4acd5ae7871ac84626cd4225f21130867905437 (diff) | |
download | mxe-fcc5a2b60368174d02607862e62b00decb086baa.zip mxe-fcc5a2b60368174d02607862e62b00decb086baa.tar.gz mxe-fcc5a2b60368174d02607862e62b00decb086baa.tar.bz2 |
new package: libieee1284
Diffstat (limited to 'src/libieee1284-4-getversion.patch')
-rw-r--r-- | src/libieee1284-4-getversion.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/libieee1284-4-getversion.patch b/src/libieee1284-4-getversion.patch new file mode 100644 index 0000000..99a9a2c --- /dev/null +++ b/src/libieee1284-4-getversion.patch @@ -0,0 +1,42 @@ +From c6962803f486e34cde370b34845741c8c380c460 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net> +Date: Sat, 19 Sep 2015 01:39:15 +0200 +Subject: [PATCH] check Windows version before allowing IO access + +--- + src/detect.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/detect.c b/src/detect.c +index ca7f85b..d675584 100644 +--- a/src/detect.c ++++ b/src/detect.c +@@ -49,7 +49,7 @@ + #elif defined(HAVE_SOLARIS) + #include <sys/ddi.h> + #include <sys/sunddi.h> +-#elif defined(HAVE_CYGWIN_NT) ++#elif defined(HAVE_CYGWIN_NT) || defined(HAVE_CYGWIN_9X) + #ifdef HAVE_W32API_WINDOWS_H + #include <w32api/windows.h> + #else +@@ -191,10 +191,12 @@ check_io (void) + } + debugprintf ("We can't use IOP, nothing will work\n"); + #elif defined(HAVE_CYGWIN_9X) +- /* note: 95 allows apps direct IO access */ +- debugprintf ("Taking a guess on port availability (win9x)\n"); +- capabilities |= IO_CAPABLE; +- return 1; ++ /* note: Win32s/95/98/ME allows apps direct IO access */ ++ if (GetVersion() & (1 << 31)) { ++ debugprintf ("Taking a guess on port availability (win9x)\n"); ++ capabilities |= IO_CAPABLE; ++ return 1; ++ } + #endif + + return 0; +-- +2.1.4 + |