summaryrefslogtreecommitdiff
path: root/bits.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-25 16:59:20 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-25 16:59:20 -0500
commit1d996ee56568b8fa8a03b386eda830a8bb543781 (patch)
treec3a049eb4eb798a3c2d608e0bb5f3343cc4ebbca /bits.h
parentf258275ffec682cceed56d628853c68b02a07770 (diff)
downloadgpsd-1d996ee56568b8fa8a03b386eda830a8bb543781.tar.gz
We no longer rely on long long to be 64 bits.
All regression tests pass.
Diffstat (limited to 'bits.h')
-rw-r--r--bits.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/bits.h b/bits.h
index 6a41fd79..886ee548 100644
--- a/bits.h
+++ b/bits.h
@@ -8,11 +8,7 @@
* By defining the GET_ORIGIN and PUT_ORIGIN macros before including
* this header, it's possible to change the origin of the indexing.
*
- * Assumptions:
- * char is 8 bits, short is 16 bits, int is 32 bits, long long is 64 bits,
- * float is 32 bits IEEE754, double is 64 bits IEEE754.
- *
- * The use of fixed-length types in the casts enforces these.
+ * We enforce data sizes of integral types in the casts on these.
* Both 32- and 64-bit systems with gcc are OK with this set.
*
* This file is Copyright (c)2010 by the GPSD project
@@ -85,7 +81,7 @@ union long_double {
(void)memcpy(to, from+2*(s)-2, 2*((e)-(s)+1))
/* bitfield extraction */
-extern unsigned long long ubits(char buf[], unsigned int, unsigned int);
-extern signed long long sbits(char buf[], unsigned int, unsigned int);
+extern uint64_t ubits(char buf[], unsigned int, unsigned int);
+extern int64_t sbits(char buf[], unsigned int, unsigned int);
#endif /* _GPSD_BITS_H_ */