Mark D. Baushke wrote: > For this is the bug report: > <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=15040> > CVS needs the following patch applied to GNULIB/lib/stdlib_.h > > Apparently, OpenBSD puts the standard exact-width integer types into > /usr/include/machine/int_types.h which is included by both <sys/types.h> > and <stddef.h>. > > Alex has verified that the patch below fixes his problem building CVS on > his OpenBSD box.
Thanks for the report and patch. However, I think it is not entirely correct on all versions of OpenBSD. Namely, OpenBSD 3.8 does _not_ define intptr_t and uintptr_t in <sys/types.h>; you need also <inttypes.h> for these two typedefs. I am therefore committing the appended patch. Does it work for you? Bruno 2006-03-29 Mark D. Baushke <[EMAIL PROTECTED]> Bruno Haible <[EMAIL PROTECTED]> * stdint_.h: On OpenBSD, don't redefine types already included in <sys/types.h> and <inttypes.h>. *** lib/stdint_.h 11 Jan 2006 17:12:47 -0000 1.11 --- lib/stdint_.h 29 Mar 2006 13:03:17 -0000 *************** *** 33,38 **** --- 33,48 ---- #if defined(__FreeBSD__) # include <sys/inttypes.h> #endif + #if defined(__OpenBSD__) + /* In OpenBSD 3.8, <sys/types.h> includes <machine/types.h>, which defines + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. + <inttypes.h> includes <machine/types.h> and also defines intptr_t and + uintptr_t. */ + # include <sys/types.h> + # if HAVE_INTTYPES_H + # include <inttypes.h> + # endif + #endif #if defined(__linux__) && HAVE_SYS_BITYPES_H /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is *************** *** 62,68 **** /* 7.18.1.1. Exact-width integer types */ ! #if !defined(__FreeBSD__) #ifdef _STDINT_H_NEED_SIGNED_INT_TYPES typedef signed char int8_t; --- 72,78 ---- /* 7.18.1.1. Exact-width integer types */ ! #if !(defined(__FreeBSD__) || defined(__OpenBSD__)) #ifdef _STDINT_H_NEED_SIGNED_INT_TYPES typedef signed char int8_t; *************** *** 97,103 **** #define _STDINT_H_HAVE_INT64 #endif ! #endif /* !FreeBSD */ /* 7.18.1.2. Minimum-width integer types */ --- 107,113 ---- #define _STDINT_H_HAVE_INT64 #endif ! #endif /* !(FreeBSD || OpenBSD) */ /* 7.18.1.2. Minimum-width integer types */ *************** *** 127,140 **** /* 7.18.1.4. Integer types capable of holding object pointers */ ! #if !defined(__FreeBSD__) /* On some platforms (like IRIX6 MIPS with -n32) sizeof(void*) < sizeof(long), but this doesn't matter here. */ typedef long intptr_t; typedef unsigned long uintptr_t; ! #endif /* !FreeBSD */ /* 7.18.1.5. Greatest-width integer types */ --- 137,150 ---- /* 7.18.1.4. Integer types capable of holding object pointers */ ! #if !(defined(__FreeBSD__) || (defined(__OpenBSD__) && HAVE_INTTYPES_H)) /* On some platforms (like IRIX6 MIPS with -n32) sizeof(void*) < sizeof(long), but this doesn't matter here. */ typedef long intptr_t; typedef unsigned long uintptr_t; ! #endif /* !(FreeBSD || (OpenBSD && HAVE_INTTYPES_H)) */ /* 7.18.1.5. Greatest-width integer types */ _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib