chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(ident_socket): change sizes to be @size_t@.
[mLib]
/
bits.h
diff --git
a/bits.h
b/bits.h
index 5ce1d9543e703edfc00c727a4783875b04b44324..3a7343cb9368eae8e6177a3a319cd5b2e9f9968b 100644
(file)
--- a/
bits.h
+++ b/
bits.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: bits.h,v 1.
7 2000/07/22 09:48:26
mdw Exp $
+ * $Id: bits.h,v 1.
8 2000/10/08 11:06:30
mdw Exp $
*
* Portable bit-level manipulation macros
*
*
* Portable bit-level manipulation macros
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: bits.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: bits.h,v $
+ * Revision 1.8 2000/10/08 11:06:30 mdw
+ * Shut later versions of GCC up about use of @long long@.
+ *
* Revision 1.7 2000/07/22 09:48:26 mdw
* Added macros for reading 64-bit values.
*
* Revision 1.7 2000/07/22 09:48:26 mdw
* Added macros for reading 64-bit values.
*
@@
-70,6
+73,14
@@
/*----- Decide on some types ----------------------------------------------*/
/*----- Decide on some types ----------------------------------------------*/
+/* --- Make GNU C shut up --- */
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 91)
+# define MLIB_BITS_EXTENSION __extension__
+#else
+# define MLIB_BITS_EXTENSION
+#endif
+
/* --- Decide on a 32-bit type --- *
*
* I want a type which is capable of expressing 32-bit numbers. Because some
/* --- Decide on a 32-bit type --- *
*
* I want a type which is capable of expressing 32-bit numbers. Because some
@@
-96,14
+107,14
@@
#endif
#if UINT_MAX >> 31 > 0xffffffff
#endif
#if UINT_MAX >> 31 > 0xffffffff
-# define HAVE_UINT64
- typedef unsigned int uint64;
+#
define HAVE_UINT64
+
typedef unsigned int uint64;
#elif ULONG_MAX >> 31 > 0xffffffff
#elif ULONG_MAX >> 31 > 0xffffffff
-# define HAVE_UINT64
- typedef unsigned long uint64;
+#
define HAVE_UINT64
+
typedef unsigned long uint64;
#elif defined(ULLONG_MAX)
#elif defined(ULLONG_MAX)
-# define HAVE_UINT64
- typedef unsigned long long uint64;
+#
define HAVE_UINT64
+
MLIB_BITS_EXTENSION
typedef unsigned long long uint64;
#endif
#ifdef DEBUG64
#endif
#ifdef DEBUG64
@@
-148,7
+159,7
@@
typedef unsigned char octet;
#define MASK32 0xffffffffu
#ifdef HAVE_UINT64
#define MASK32 0xffffffffu
#ifdef HAVE_UINT64
-# define MASK64
0xffffffffffffffffull
+# define MASK64
MLIB_BITS_EXTENSION 0xffffffffffffffffu
#endif
/* --- Type coercions --- */
#endif
/* --- Type coercions --- */