aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include/netinet/in.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:16:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:16:22 -0700
commit5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d (patch)
treed88795d0d3aba72776a20bf8ee4c8778815df3d0 /com32/include/netinet/in.h
parentdcd9ae222c665a56a57a560be62b407a04573e13 (diff)
parent8833b1c37f7ecfa41e0e2c26e72c2913d5eba969 (diff)
downloadsyslinux-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.tar.gz
syslinux-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.tar.xz
syslinux-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.zip
Merge branch 'master' into core32
Conflicts: com32/include/netinet/in.h com32/include/sys/cpu.h dos/argv.c dos/malloc.c dos/syslinux.c extlinux/main.c libinstaller/setadv.c libinstaller/syslinux.h libinstaller/syslxint.h libinstaller/syslxmod.c linux/syslinux.c mtools/syslinux.c win32/syslinux.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include/netinet/in.h')
-rw-r--r--com32/include/netinet/in.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/com32/include/netinet/in.h b/com32/include/netinet/in.h
index e8cacf6c..582632c9 100644
--- a/com32/include/netinet/in.h
+++ b/com32/include/netinet/in.h
@@ -7,7 +7,7 @@
static inline uint16_t __htons(uint16_t v)
{
- return ((v) << 8) | ((v) >> 8);
+ return ((v) << 8) | ((v) >> 8);
}
#define htons(x) __htons(x)
@@ -15,15 +15,14 @@ static inline uint16_t __htons(uint16_t v)
static inline uint32_t __htonl(uint32_t v)
{
- if ( __builtin_constant_p(v) ) {
- return (((v) & 0x000000ff) << 24) |
- (((v) & 0x0000ff00) << 8) |
- (((v) & 0x00ff0000) >> 8) |
- (((v) & 0xff000000) >> 24);
- } else {
- asm("xchgb %h0,%b0 ; roll $16,%0 ; xchgb %h0,%b0" : "+q" (v));
- return v;
- }
+ if (__builtin_constant_p(v)) {
+ return (((v) & 0x000000ff) << 24) |
+ (((v) & 0x0000ff00) << 8) |
+ (((v) & 0x00ff0000) >> 8) | (((v) & 0xff000000) >> 24);
+ } else {
+asm("xchgb %h0,%b0 ; roll $16,%0 ; xchgb %h0,%b0":"+q"(v));
+ return v;
+ }
}
#define htonl(x) __htonl(x)
@@ -31,7 +30,7 @@ static inline uint32_t __htonl(uint32_t v)
static inline uint64_t __htonq(uint64_t v)
{
- return ((uint64_t) __htonl(v) << 32) | __htonl(v >> 32);
+ return ((uint64_t) __htonl(v) << 32) | __htonl(v >> 32);
}
#define htonq(x) __htonq(x)
@@ -41,7 +40,7 @@ typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;
struct in_addr {
- in_addr_t s_addr;
+ in_addr_t s_addr;
};
#endif /* _NETINET_IN_H */