]>
Commit | Line | Data |
---|---|---|
1f2f436a A |
1 | --- hash.c.orig 2009-11-06 12:41:16.000000000 -0800 |
2 | +++ hash.c 2009-11-06 12:41:27.000000000 -0800 | |
3 | @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD: src/lib/libc/db/hash | |
59e0d9fe A |
4 | #include <db.h> |
5 | #include "hash.h" | |
6 | #include "page.h" | |
7 | -#include "extern.h" | |
8 | +#include "hash_extern.h" | |
9 | ||
10 | static int alloc_segs(HTAB *, int); | |
11 | static int flush_meta(HTAB *); | |
1f2f436a | 12 | @@ -104,8 +104,7 @@ __hash_open(const char *file, int flags, |
224c7076 A |
13 | int bpages, hdrsize, new_table, nsegs, save_errno; |
14 | ||
15 | if ((flags & O_ACCMODE) == O_WRONLY) { | |
16 | - errno = EINVAL; | |
17 | - return (NULL); | |
18 | + flags += O_RDWR - O_WRONLY; /* POSIX */ | |
19 | } | |
20 | ||
21 | if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB)))) | |
1f2f436a | 22 | @@ -684,7 +683,7 @@ found: |
34e8f829 A |
23 | return (ERROR); |
24 | break; | |
25 | default: | |
26 | - abort(); | |
27 | + LIBC_ABORT("illegal action (%d)", action); | |
28 | } | |
29 | save_bufp->flags &= ~BUF_PIN; | |
30 | return (SUCCESS); |