carbon changes. r=pink/sdagley/beard. a=sfraser.
carbon changes. r=pink/sdagley/beard. a=sfraser.
--- a/dbm/include/cdefs.h
+++ b/dbm/include/cdefs.h
@@ -96,17 +96,17 @@
#define __const const /* define reserved names to standard */
#endif /* __const */
#define __signed signed
#define __volatile volatile
#ifndef _WINDOWS
#if defined(__cplusplus)
#define __inline inline /* convert to C++ keyword */
#else
-#ifndef __GNUC__
+#if !defined(__GNUC__) && !defined(__MWERKS__)
#define __inline /* delete GCC keyword */
#endif /* !__GNUC__ */
#endif /* !__cplusplus */
#endif /* !_WINDOWS */
#else /* !(__STDC__ || __cplusplus) */
#define __P(protos) () /* traditional C preprocessor */
#define __CONCAT(x,y) x/**/y
--- a/dbm/src/db.c
+++ b/dbm/src/db.c
@@ -42,19 +42,17 @@ static char sccsid[] = "@(#)db.c 8.4 (Be
#endif
#ifdef macintosh
#include <unix.h>
#else
#include <sys/types.h>
#endif
#include <errno.h>
-#ifndef macintosh
#include <fcntl.h>
-#endif
#include <stddef.h>
#include <stdio.h>
#include "mcom_db.h"
/* a global flag that locks closed all databases */
int all_databases_locked_closed = 0;
--- a/dbm/src/h_page.c
+++ b/dbm/src/h_page.c
@@ -61,20 +61,22 @@ static char sccsid[] = "@(#)hash_page.c
* Internal
* overflow_page
* open_temp
*/
#ifndef macintosh
#include <sys/types.h>
#endif
+#if defined(macintosh)
+#include <unistd.h>
+#endif
+
#include <errno.h>
-#ifndef macintosh
#include <fcntl.h>
-#endif
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <unistd.h>
#endif
--- a/dbm/src/hash.c
+++ b/dbm/src/hash.c
@@ -46,22 +46,23 @@ static char sccsid[] = "@(#)hash.c 8.9 (
#if !defined(macintosh)
#ifdef XP_OS2_EMX
#include <sys/types.h>
#endif
#include <sys/stat.h>
#endif
-#include <errno.h>
-#ifdef macintosh
+#if defined(macintosh)
#include <unix.h>
-#else
+#include <unistd.h>
+#endif
+
+#include <errno.h>
#include <fcntl.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <unistd.h>
#endif
--- a/dbm/src/hsearch.c
+++ b/dbm/src/hsearch.c
@@ -37,19 +37,19 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hsearch.c 8.4 (Berkeley) 7/21/94";
#endif /* LIBC_SCCS and not lint */
#include "watcomfx.h"
#ifndef macintosh
#include <sys/types.h>
+#endif
#include <fcntl.h>
-#endif
#include <string.h>
#include "mcom_db.h"
#include "hsearch.h"
static DB *dbp = NULL;
static ENTRY retval;