summaryrefslogtreecommitdiff
path: root/libusb/os/windows_compat.c
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-01-28 23:18:52 +0000
committerPete Batard <pbatard@gmail.com>2010-01-28 23:18:52 +0000
commit47c83183c080c866c54bcf886e535ff7db907bb8 (patch)
treebdc1368e54dd601ec679f392e843a6700c4684f9 /libusb/os/windows_compat.c
parent37b685c3558513e32b30418c9fbc057d83a7ff53 (diff)
downloadlibusb-47c83183c080c866c54bcf886e535ff7db907bb8.tar.gz
r122: fixed poll conflict on cygwin (all compat functions renamed to _libusb_####)
- fixed sscanf_s undefined for non MS compilers - fixed cygiwn warnings in windows_usb.c
Diffstat (limited to 'libusb/os/windows_compat.c')
-rw-r--r--libusb/os/windows_compat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libusb/os/windows_compat.c b/libusb/os/windows_compat.c
index 180ff0c..58b91d3 100644
--- a/libusb/os/windows_compat.c
+++ b/libusb/os/windows_compat.c
@@ -268,7 +268,7 @@ __inline void _init_read_marker(int index)
/*
* Create an async I/O anonymous pipe (that can be used for sync as well)
*/
-int pipe_for_poll(int filedes[2])
+int _libusb_pipe(int filedes[2])
{
int i, j;
HANDLE handle[2];
@@ -526,7 +526,7 @@ struct winfd overlapped_to_winfd(OVERLAPPED* overlapped)
* Currently, this function only accepts one of POLLIN or POLLOUT per fd
* (but you can create multiple fds from the same handle for read and write)
*/
-int poll(struct pollfd *fds, unsigned int nfds, int timeout)
+int _libusb_poll(struct pollfd *fds, unsigned int nfds, int timeout)
{
unsigned i, triggered = 0;
int index, object_index;
@@ -635,7 +635,7 @@ int poll(struct pollfd *fds, unsigned int nfds, int timeout)
*
* Note that this function will also close the associated handle
*/
-int close_for_poll(int fd)
+int _libusb_close(int fd)
{
int index;
HANDLE handle;
@@ -667,7 +667,7 @@ int close_for_poll(int fd)
* - binary mode only
* - no append mode
*/
-ssize_t write_for_poll(int fd, const void *buf, size_t count)
+ssize_t _libusb_write(int fd, const void *buf, size_t count)
{
int index;
DWORD wr_count;
@@ -743,7 +743,7 @@ out:
* synchronous read for custom poll (works on Windows file handles that
* have been opened with the FILE_FLAG_OVERLAPPED flag)
*/
-ssize_t read_for_poll(int fd, void *buf, size_t count)
+ssize_t _libusb_read(int fd, void *buf, size_t count)
{
int index;
DWORD rd_count;