# include <unistd.h>
#else
# include <io.h>
+# include <winsock2.h>
+# include <ws2tcpip.h>
+# undef read
+# define read( a, b, c ) recv (a, b, c, 0)
+# undef write
+# define write( a, b, c ) send (a, b, c, 0)
+# undef close
+# define close( a ) closesocket (a)
#endif
#include <search.h>
#ifdef WIN32
-# include <winsock2.h>
-# include <ws2tcpip.h>
-
/**
* select()-able pipes emulated using Winsock
*/
closesocket (c);
return -1;
}
-
-#undef read
-#define read( a, b, c ) recv (a, b, c, 0)
-#undef write
-#define write( a, b, c ) send (a, b, c, 0)
-#undef close
-#define close( a ) closesocket (a)
#endif /* WIN32 */
static vlc_mutex_t pipe_lock = VLC_STATIC_MUTEX;