common: Uniform ssize_t definition between MSVC and others
This commit is contained in:
		
							parent
							
								
									4dba1d55d1
								
							
						
					
					
						commit
						47c126262c
					
				|  | @ -9,8 +9,11 @@ | ||||||
| #include <sys/time.h> | #include <sys/time.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | // ssize_t definition for all systems
 | ||||||
| #if defined(_MSC_VER) | #if defined(_MSC_VER) | ||||||
| typedef SSIZE_T ssize_t; | typedef SSIZE_T ssize_t; | ||||||
|  | #else | ||||||
|  | #include <sys/types.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #include <stdint.h> | #include <stdint.h> | ||||||
|  |  | ||||||
|  | @ -16,7 +16,6 @@ | ||||||
| #include <windows.h> | #include <windows.h> | ||||||
| #else | #else | ||||||
| #include <arpa/inet.h> | #include <arpa/inet.h> | ||||||
| #include <sys/types.h> |  | ||||||
| #include <cassert> | #include <cassert> | ||||||
| #include <cstring> | #include <cstring> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -11,10 +11,6 @@ | ||||||
| #include <vector> | #include <vector> | ||||||
| #include <mutex> | #include <mutex> | ||||||
| 
 | 
 | ||||||
| #if defined(_MSC_VER) |  | ||||||
| typedef SSIZE_T ssize_t; |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| // TODO: get these from socket?
 | // TODO: get these from socket?
 | ||||||
| const int MAX_MSG_COUNT   = 5000; | const int MAX_MSG_COUNT   = 5000; | ||||||
| const int MAX_QUEUED_MSGS =  10; | const int MAX_QUEUED_MSGS =  10; | ||||||
|  |  | ||||||
|  | @ -12,8 +12,6 @@ | ||||||
| #include "rtcp_packets.hh" | #include "rtcp_packets.hh" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| #ifndef _WIN32 | #ifndef _WIN32 | ||||||
| #include <sys/time.h> | #include <sys/time.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -5,11 +5,6 @@ | ||||||
| 
 | 
 | ||||||
| #include <chrono> | #include <chrono> | ||||||
| 
 | 
 | ||||||
| #ifndef _WIN32 |  | ||||||
| #include <sys/types.h> |  | ||||||
| #endif // !_WIN32
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| namespace uvgrtp { | namespace uvgrtp { | ||||||
| 
 | 
 | ||||||
|     namespace frame |     namespace frame | ||||||
|  |  | ||||||
|  | @ -20,7 +20,6 @@ | ||||||
| #include <mswsock.h> | #include <mswsock.h> | ||||||
| #include <inaddr.h> | #include <inaddr.h> | ||||||
| #else | #else | ||||||
| #include <sys/types.h> |  | ||||||
| #include <sys/socket.h> | #include <sys/socket.h> | ||||||
| #include <errno.h> | #include <errno.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue