mirror of
				https://github.com/msgpack/msgpack-c.git
				synced 2025-10-25 18:23:00 +02:00 
			
		
		
		
	Detect POSIX compatiblity explicit
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
This commit is contained in:
		| @@ -74,7 +74,7 @@ | ||||
| #       endif | ||||
| #   endif | ||||
|  | ||||
| #else /* _*/ | ||||
| #elif defined(unix) || defined(__unix) || defined(__APPLE__) | ||||
|  | ||||
| #include <arpa/inet.h>  /* __BYTE_ORDER */ | ||||
| #   if defined(linux) | ||||
| @@ -85,7 +85,9 @@ | ||||
|  | ||||
| #if MSGPACK_ENDIAN_LITTLE_BYTE | ||||
|  | ||||
| #   ifdef _WIN32 | ||||
| #   if defined(unix) || defined(__unix) || defined(__APPLE__) | ||||
| #       define _msgpack_be16(x) ntohs(x) | ||||
| #   else | ||||
| #       if defined(ntohs) | ||||
| #           define _msgpack_be16(x) ntohs(x) | ||||
| #       elif defined(_byteswap_ushort) || (defined(_MSC_VER) && _MSC_VER >= 1400) | ||||
| @@ -95,11 +97,11 @@ | ||||
|                 ((((uint16_t)x) <<  8) ) | \ | ||||
|                 ((((uint16_t)x) >>  8) ) ) | ||||
| #        endif | ||||
| #   else | ||||
| #        define _msgpack_be16(x) ntohs(x) | ||||
| #   endif | ||||
|  | ||||
| #   ifdef _WIN32 | ||||
| #   if defined(unix) || defined(__unix) || defined(__APPLE__) | ||||
| #       define _msgpack_be32(x) ntohl(x) | ||||
| #   else | ||||
| #       if defined(ntohl) | ||||
| #           define _msgpack_be32(x) ntohl(x) | ||||
| #       elif defined(_byteswap_ulong) || (defined(_MSC_VER) && _MSC_VER >= 1400) | ||||
| @@ -111,8 +113,6 @@ | ||||
|                   ((((uint32_t)x) >>  8) & 0x0000ff00U ) | \ | ||||
|                   ((((uint32_t)x) >> 24)               ) ) | ||||
| #       endif | ||||
| #   else | ||||
| #        define _msgpack_be32(x) ntohl(x) | ||||
| #   endif | ||||
|  | ||||
| #   if defined(_byteswap_uint64) || (defined(_MSC_VER) && _MSC_VER >= 1400) | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
| #include "zone.h" | ||||
| #include <stdlib.h> | ||||
|  | ||||
| #ifndef _WIN32 | ||||
| #if defined(unix) || defined(__unix) || defined(__APPLE__) | ||||
| #include <sys/uio.h> | ||||
| #else | ||||
| struct iovec { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stefan Herbrechtsmeier
					Stefan Herbrechtsmeier