diff src/database.c @ 3739:6d4dc9ec7240

[xemacs-hg @ 2006-12-11 19:43:57 by aidan] Check for the various u*_t types in configure, use those definitions in C.
author aidan
date Mon, 11 Dec 2006 19:44:56 +0000
parents 4c038e89d563
children 9a633a00c3f2
line wrap: on
line diff
--- a/src/database.c	Mon Dec 11 13:32:41 2006 +0000
+++ b/src/database.c	Mon Dec 11 19:44:56 2006 +0000
@@ -45,16 +45,24 @@
 /* glibc 2.1 doesn't have this problem with DB 2.x */
 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
 #ifdef HAVE_INTTYPES_H
+#ifndef __BIT_TYPES_DEFINED__
 #define __BIT_TYPES_DEFINED__
+#endif
 #include <inttypes.h>
-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
+#if !HAVE_U_INT8_T
 typedef uint8_t  u_int8_t;
+#endif
+#if !HAVE_U_INT16_T
 typedef uint16_t u_int16_t;
+#endif
+#if !HAVE_U_INT32_T
 typedef uint32_t u_int32_t;
+#endif
 #ifdef WE_DONT_NEED_QUADS
+#if !HAVE_U_INT64_T
 typedef uint64_t u_int64_t;
+#endif
 #endif /* WE_DONT_NEED_QUADS */
-#endif /* __FreeBSD__ */
 #endif /* HAVE_INTTYPES_H */
 #endif /* !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) */
 /* Berkeley DB wants __STDC__ to be defined; else if does `#define const' */