#include <db.h>
#include "hash.h"
#include "page.h"
-#include "extern.h"
+#include "hash_extern.h"
static int alloc_segs(HTAB *, int);
static int flush_meta(HTAB *);
int bpages, hdrsize, new_table, nsegs, save_errno;
if ((flags & O_ACCMODE) == O_WRONLY) {
- errno = EINVAL;
- return (NULL);
+ flags += O_RDWR - O_WRONLY; /* POSIX */
}
if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB))))
return (ERROR);
break;
default:
- abort();
+ LIBC_ABORT("illegal action (%d)", action);
}
save_bufp->flags &= ~BUF_PIN;
return (SUCCESS);