From ab87627c5c4154a3e30108f7e4dd07f5d95c4390 Mon Sep 17 00:00:00 2001 From: ntfreak Date: Thu, 1 Jan 2009 16:06:46 +0000 Subject: - add gdb pipe support to native win32 (--pipe option) git-svn-id: svn://svn.berlios.de/openocd/trunk@1294 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/replacements.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/helper/replacements.h') diff --git a/src/helper/replacements.h b/src/helper/replacements.h index b6165085..c3a2bf77 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -180,6 +180,9 @@ static __inline void outb(unsigned char value, unsigned short int port) } #endif /* IS_MINGW */ + +int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv); + #endif /* _WIN32 */ /* generic socket functions for Windows and Posix */ @@ -221,6 +224,15 @@ static __inline void socket_nonblock(int fd) #endif } +static __inline int socket_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv) +{ +#ifdef _WIN32 + return win_select(max_fd, rfds, wfds, efds, tv); +#else + return select(max_fd, rfds, wfds, efds, tv); +#endif +} + #ifndef HAVE_ELF_H typedef struct -- cgit v1.2.3