[haiku-commits] haiku: hrev53012 - headers/posix/netinet

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 27 Mar 2019 10:22:17 -0400 (EDT)

hrev53012 adds 1 changeset to branch 'master'
old head: 8e309168b9fc8408375fc26aa85b08d49856fc7a
new head: 569791be528cbda474e81783a870cb8cff76231d
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=569791be528c+%5E8e309168b9fc

----------------------------------------------------------------------------

569791be528c: headers/posix: Define the byteswap macros unconditionally.
  
  It helps if one tests GCC4+ fixes on GCC4+...

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53012
Commit:      569791be528cbda474e81783a870cb8cff76231d
URL:         https://git.haiku-os.org/haiku/commit/?id=569791be528c
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Wed Mar 27 14:19:50 2019 UTC

----------------------------------------------------------------------------

1 file changed, 9 insertions(+), 11 deletions(-)
headers/posix/netinet/in.h | 20 +++++++++-----------

----------------------------------------------------------------------------

diff --git a/headers/posix/netinet/in.h b/headers/posix/netinet/in.h
index c0577fdcf8..6e177d4351 100644
--- a/headers/posix/netinet/in.h
+++ b/headers/posix/netinet/in.h
@@ -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.
  */
 #ifndef _NETINET_IN_H_
@@ -24,16 +24,14 @@ typedef uint32_t in_addr_t;
 
 /* We can't include <ByteOrder.h> since we are a POSIX file,
  * and we are not allowed to import all the BeOS types here. */
-#if !defined(__swap_int32)
-#      if __GNUC__ >= 4
-#              define __net_swap_int32(arg)    (uint32_t)__builtin_bswap32(arg)
-#              define __net_swap_int16(arg)    (uint16_t)__builtin_bswap16(arg)
-#      else
-               extern unsigned long __swap_int32(unsigned long); /* private */
-               extern uint16_t __swap_int16(uint16_t); /* private */
-#              define __net_swap_int32(arg)    __swap_int32(arg)
-#              define __net_swap_int16(arg)    __swap_int16(arg)
-#      endif
+#if __GNUC__ >= 4
+#      define __net_swap_int32(arg)    (uint32_t)__builtin_bswap32(arg)
+#      define __net_swap_int16(arg)    (uint16_t)__builtin_bswap16(arg)
+#else
+       extern unsigned long __swap_int32(unsigned long); /* private */
+       extern uint16_t __swap_int16(uint16_t); /* private */
+#      define __net_swap_int32(arg)    __swap_int32(arg)
+#      define __net_swap_int16(arg)    __swap_int16(arg)
 #endif
 
 #ifndef htonl


Other related posts:

  • » [haiku-commits] haiku: hrev53012 - headers/posix/netinet - waddlesplash