----- Original Message -----
> From: "Pete Batard" <p...@akeo.ie>
> To: libusbx-devel@lists.sourceforge.net
> Sent: Wednesday, 16 January, 2013 2:38:22 AM
> Subject: [Libusbx-devel] WinCE integration (was: 2 new commits in libusbx)
>
> Alrighty, proposed integration changes are now available from
> https://github.com/pbatard/libusbx/commits/wince-integration
>
> I had to update a few things (I'll try to talk more on that
> tomorrow),
> but otherwise I think we're in good shape, though I focused on not
> breaking the existing backends, and still have to check I haven't
> broken CE.
>
> Feel free to start testing this branch, as this is the proposal for
> what
> should end up in mainline.
>
There are a couple of changes that are needed to get it to build on WinCE. See
the attached patch.
I don't quite understand why poll_windows.h now needs to explicitly include
<libusb.h> (for ssize_t). I assume it must have just been luck before that all
files which #included poll_windows.h happened to have already included libusb.h.
Regards,
Toby
From 4927586400b7674816a4500ea4d969764fb9b65c Mon Sep 17 00:00:00 2001
From: Toby Gray <toby.g...@realvnc.com>
Date: Wed, 16 Jan 2013 17:04:43 +0000
Subject: [PATCH] WinCE: Fix minor build issues in WinCE backend
---
libusb/libusbi.h | 2 +-
libusb/os/poll_windows.c | 4 ++--
libusb/os/poll_windows.h | 3 +++
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index a6843a8..ac7f71c 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -392,7 +392,7 @@ int usbi_get_config_index_by_value(struct libusb_device *dev,
#if defined(OS_LINUX) || defined(OS_DARWIN) || defined(OS_OPENBSD)
#include <unistd.h>
#include "os/poll_posix.h"
-#elif defined(OS_WINDOWS)
+#elif defined(OS_WINDOWS) || defined(OS_WINCE)
#include <os/poll_windows.h>
#endif
diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c
index 9d34114..9ece711 100644
--- a/libusb/os/poll_windows.c
+++ b/libusb/os/poll_windows.c
@@ -143,9 +143,9 @@ static __inline BOOL cancel_io(int _index)
|| (poll_fd[_index].handle == 0) || (poll_fd[_index].overlapped == NULL) ) {
return TRUE;
}
- if (poll_fd[_index].itransfer && poll_fd[_index].cancelTransfer) {
+ if (poll_fd[_index].itransfer && poll_fd[_index].cancel_fn) {
// Cancel outstanding transfer via the specific callback
- (*poll_fd[_index].cancelTransfer)(poll_fd[_index].itransfer);
+ (*poll_fd[_index].cancel_fn)(poll_fd[_index].itransfer);
}
return TRUE;
}
diff --git a/libusb/os/poll_windows.h b/libusb/os/poll_windows.h
index 32145fd..e81b76c 100644
--- a/libusb/os/poll_windows.h
+++ b/libusb/os/poll_windows.h
@@ -21,6 +21,9 @@
*/
#pragma once
+// Needed for ssize_t
+#include <libusb.h>
+
#if defined(_MSC_VER)
// disable /W4 MSVC warnings that are benign
#pragma warning(disable:4127) // conditional expression is constant
--
1.7.9
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel