headers/posix: Define the byteswap macros unconditionally.
It helps if one tests GCC4+ fixes on GCC4+...
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2012 Haiku, Inc. All Rights Reserved.
|
* Copyright 2002-2019, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _NETINET_IN_H_
|
#ifndef _NETINET_IN_H_
|
||||||
@@ -24,7 +24,6 @@ typedef uint32_t in_addr_t;
|
|||||||
|
|
||||||
/* We can't include <ByteOrder.h> since we are a POSIX file,
|
/* We can't include <ByteOrder.h> since we are a POSIX file,
|
||||||
* and we are not allowed to import all the BeOS types here. */
|
* and we are not allowed to import all the BeOS types here. */
|
||||||
#if !defined(__swap_int32)
|
|
||||||
#if __GNUC__ >= 4
|
#if __GNUC__ >= 4
|
||||||
# define __net_swap_int32(arg) (uint32_t)__builtin_bswap32(arg)
|
# define __net_swap_int32(arg) (uint32_t)__builtin_bswap32(arg)
|
||||||
# define __net_swap_int16(arg) (uint16_t)__builtin_bswap16(arg)
|
# define __net_swap_int16(arg) (uint16_t)__builtin_bswap16(arg)
|
||||||
@@ -34,7 +33,6 @@ typedef uint32_t in_addr_t;
|
|||||||
# define __net_swap_int32(arg) __swap_int32(arg)
|
# define __net_swap_int32(arg) __swap_int32(arg)
|
||||||
# define __net_swap_int16(arg) __swap_int16(arg)
|
# define __net_swap_int16(arg) __swap_int16(arg)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef htonl
|
#ifndef htonl
|
||||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
|
|||||||
Reference in New Issue
Block a user