diff options
| author | 2004-01-11 19:17:31 +0000 | |
|---|---|---|
| committer | 2004-01-11 19:17:31 +0000 | |
| commit | 5bbcc470c5a197f5d96bca51155956224a4fda63 (patch) | |
| tree | 2509519c0ffa28856f85d84f078fb26d330cead6 | |
| parent | use struct bgpd_addr for nexthop and gateway in struct kroute_nexthop (diff) | |
| download | wireguard-openbsd-5bbcc470c5a197f5d96bca51155956224a4fda63.tar.xz wireguard-openbsd-5bbcc470c5a197f5d96bca51155956224a4fda63.zip | |
mark u_int64_t constants with ULL to make gcc3 happy
ok drahn@ tedu@
| -rw-r--r-- | sys/sys/endian.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/sys/endian.h b/sys/sys/endian.h index b617ea287db..c520501d290 100644 --- a/sys/sys/endian.h +++ b/sys/sys/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.13 2003/09/26 17:06:50 fgsch Exp $ */ +/* $OpenBSD: endian.h,v 1.14 2004/01/11 19:17:31 brad Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -68,13 +68,13 @@ u_int64_t __swap64gen_x = (x); \ \ (u_int64_t)((__swap64gen_x & 0xff) << 56 | \ - (__swap64gen_x & 0xff00) << 40 | \ - (__swap64gen_x & 0xff0000) << 24 | \ - (__swap64gen_x & 0xff000000) << 8 | \ - (__swap64gen_x & 0xff00000000) >> 8 | \ - (__swap64gen_x & 0xff0000000000) >> 24 | \ - (__swap64gen_x & 0xff000000000000) >> 40 | \ - (__swap64gen_x & 0xff00000000000000) >> 56); \ + (__swap64gen_x & 0xff00ULL) << 40 | \ + (__swap64gen_x & 0xff0000ULL) << 24 | \ + (__swap64gen_x & 0xff000000ULL) << 8 | \ + (__swap64gen_x & 0xff00000000ULL) >> 8 | \ + (__swap64gen_x & 0xff0000000000ULL) >> 24 | \ + (__swap64gen_x & 0xff000000000000ULL) >> 40 | \ + (__swap64gen_x & 0xff00000000000000ULL) >> 56); \ }) #else /* __GNUC__ */ @@ -90,13 +90,13 @@ #define __swap64gen(x) \ (u_int64_t)((((u_int64_t)(x) & 0xff) << 56) | \ - ((u_int64_t)(x) & 0xff00) << 40 | \ - ((u_int64_t)(x) & 0xff0000) << 24 | \ - ((u_int64_t)(x) & 0xff000000) << 8 | \ - ((u_int64_t)(x) & 0xff00000000) >> 8 | \ - ((u_int64_t)(x) & 0xff0000000000) >> 24 | \ - ((u_int64_t)(x) & 0xff000000000000) >> 40 | \ - ((u_int64_t)(x) & 0xff00000000000000) >> 56) + ((u_int64_t)(x) & 0xff00ULL) << 40 | \ + ((u_int64_t)(x) & 0xff0000ULL) << 24 | \ + ((u_int64_t)(x) & 0xff000000ULL) << 8 | \ + ((u_int64_t)(x) & 0xff00000000ULL) >> 8 | \ + ((u_int64_t)(x) & 0xff0000000000ULL) >> 24 | \ + ((u_int64_t)(x) & 0xff000000000000ULL) >> 40 | \ + ((u_int64_t)(x) & 0xff00000000000000ULL) >> 56) #endif /* __GNUC__ */ |
