Mercurial > mplayer.hg
comparison stream/librtsp/rtsp.c @ 28402:c884d17bd005
Convert HAVE_WINSOCK2_H into a 0/1 definition.
author | diego |
---|---|
date | Sun, 01 Feb 2009 13:42:27 +0000 |
parents | 5a30f5bc23a0 |
children | 0f1b5b68af32 |
comparison
equal
deleted
inserted
replaced
28401:e0d9eb28e807 | 28402:c884d17bd005 |
---|---|
40 #include <stdlib.h> | 40 #include <stdlib.h> |
41 #include <time.h> | 41 #include <time.h> |
42 #include <sys/time.h> | 42 #include <sys/time.h> |
43 #include <sys/types.h> | 43 #include <sys/types.h> |
44 #include <inttypes.h> | 44 #include <inttypes.h> |
45 #ifdef HAVE_WINSOCK2_H | 45 #if HAVE_WINSOCK2_H |
46 #include <winsock2.h> | 46 #include <winsock2.h> |
47 #else | 47 #else |
48 #include <sys/socket.h> | 48 #include <sys/socket.h> |
49 #endif | 49 #endif |
50 #include "mp_msg.h" | 50 #include "mp_msg.h" |
70 n = send (s, &buf[total], len - total, 0); | 70 n = send (s, &buf[total], len - total, 0); |
71 | 71 |
72 if (n > 0) | 72 if (n > 0) |
73 total += n; | 73 total += n; |
74 else if (n < 0) { | 74 else if (n < 0) { |
75 #ifndef HAVE_WINSOCK2_H | 75 #if !HAVE_WINSOCK2_H |
76 if ((timeout>0) && ((errno == EAGAIN) || (errno == EINPROGRESS))) { | 76 if ((timeout>0) && ((errno == EAGAIN) || (errno == EINPROGRESS))) { |
77 #else | 77 #else |
78 if ((timeout>0) && ((errno == EAGAIN) || (WSAGetLastError() == WSAEINPROGRESS))) { | 78 if ((timeout>0) && ((errno == EAGAIN) || (WSAGetLastError() == WSAEINPROGRESS))) { |
79 #endif | 79 #endif |
80 usec_sleep (1000000); timeout--; | 80 usec_sleep (1000000); timeout--; |