1 // Aus CygWin's /usr/include/asm/byteorder.h zusammenkopiert
2 // Es gibt keine weitere Definition von __constant_ntohl
4 typedef unsigned long uint32_t;
6 extern __inline__ uint32_t __ntohl(uint32_t);
7 extern __inline__ uint32_t __constant_ntohl(uint32_t);
9 extern __inline__ uint32_t
12 __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */
13 "rorl $16,%0\n\t" /* swap words */
14 "xchgb %b0,%h0" /* swap higher bytes */
20 #define __constant_ntohl(x) \
21 ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \
22 (((uint32_t)(x) & 0x0000ff00U) << 8) | \
23 (((uint32_t)(x) & 0x00ff0000U) >> 8) | \
24 (((uint32_t)(x) & 0xff000000U) >> 24)))