From f33e5a01324d1648b1ef91afc519f6c9c5eb7ccf Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Wed, 1 Sep 2004 16:56:51 +0000 Subject: [PATCH] Fixing build bustage on OpenBSD 3.5 (bug 256877). Patch by ju1i3n.news@free.fr and jon@rekai.net, r+sr=jst@mozilla.org git-svn-id: svn://10.0.0.236/trunk@161581 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/public/nptypes.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mozilla/modules/plugin/base/public/nptypes.h b/mozilla/modules/plugin/base/public/nptypes.h index 7a8c066cd85..918b649a1b4 100644 --- a/mozilla/modules/plugin/base/public/nptypes.h +++ b/mozilla/modules/plugin/base/public/nptypes.h @@ -58,21 +58,28 @@ #ifndef __cplusplus typedef int bool; #endif -#elif defined(bsdi) || defined(FREEBSD) +#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) /* - * BSD/OS and FreeBSD ship sys/types.h that define int32_t and u_int32_t. + * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and + * u_int32_t. */ #include /* * BSD/OS ships no header that defines uint32_t, nor bool (for C) + * OpenBSD ships no header that defines uint32_t, but provides bool as a + * macro. */ - #if defined(bsdi) + #if defined(bsdi) || defined(OPENBSD) typedef u_int32_t uint32_t; + #if defined(bsdi) #if !defined(__cplusplus) typedef int bool; #endif + #else /* OPENBSD is defined, so use its bool */ + #include + #endif #else /* * FreeBSD defines uint32_t and bool.