Fixing build bustage on OpenBSD 3.5 (bug 256877). Patch by ju1i3n.news@free.fr and jon@rekai.net, r+sr=jst@mozilla.org

This commit is contained in:
jst%mozilla.jstenback.com 2004-09-01 16:56:51 +00:00
parent bc321b52bc
commit 1a2cfd5e34

View File

@ -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 <sys/types.h>
/*
* 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 <stdbool.h>
#endif
#else
/*
* FreeBSD defines uint32_t and bool.