Tue Oct 28 17:57:36 2008 UTC ()
Use nbcompat/paths.h, Solaris is missing paths.h. From Uwe Klaus.


(joerg)
diff -r1.1 -r1.2 pkgsrc/pkgtools/libnbcompat/files/db/btree/bt_open.c
diff -r1.1 -r1.2 pkgsrc/pkgtools/libnbcompat/files/db/hash/hash_page.c

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/libnbcompat/files/db/btree/bt_open.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/files/db/btree/bt_open.c 2008/10/10 00:21:43 1.1
+++ pkgsrc/pkgtools/libnbcompat/files/db/btree/bt_open.c 2008/10/28 17:57:36 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: bt_open.c,v 1.1 2008/10/10 00:21:43 joerg Exp $ */ 1/* $NetBSD: bt_open.c,v 1.2 2008/10/28 17:57:36 joerg Exp $ */
2/* NetBSD: bt_open.c,v 1.24 2008/09/11 12:58:00 joerg Exp */ 2/* NetBSD: bt_open.c,v 1.24 2008/09/11 12:58:00 joerg Exp */
3 3
4/*- 4/*-
5 * Copyright (c) 1990, 1993, 1994 5 * Copyright (c) 1990, 1993, 1994
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to Berkeley by 8 * This code is derived from software contributed to Berkeley by
9 * Mike Olson. 9 * Mike Olson.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,48 +26,48 @@ @@ -26,48 +26,48 @@
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE. 33 * SUCH DAMAGE.
34 */ 34 */
35 35
36#include <nbcompat.h> 36#include <nbcompat.h>
37#include <nbcompat/cdefs.h> 37#include <nbcompat/cdefs.h>
38 38
39__RCSID("$NetBSD: bt_open.c,v 1.1 2008/10/10 00:21:43 joerg Exp $"); 39__RCSID("$NetBSD: bt_open.c,v 1.2 2008/10/28 17:57:36 joerg Exp $");
40 40
41/* 41/*
42 * Implementation of btree access method for 4.4BSD. 42 * Implementation of btree access method for 4.4BSD.
43 * 43 *
44 * The design here was originally based on that of the btree access method 44 * The design here was originally based on that of the btree access method
45 * used in the Postgres database system at UC Berkeley. This implementation 45 * used in the Postgres database system at UC Berkeley. This implementation
46 * is wholly independent of the Postgres code. 46 * is wholly independent of the Postgres code.
47 */ 47 */
48 48
49#include <sys/stat.h> 49#include <sys/stat.h>
50 50
51#include <assert.h> 51#include <assert.h>
52#include <errno.h> 52#include <errno.h>
53#include <fcntl.h> 53#include <fcntl.h>
54#include <limits.h> 54#include <limits.h>
55#include <signal.h> 55#include <signal.h>
56#include <stdio.h> 56#include <stdio.h>
57#include <stdlib.h> 57#include <stdlib.h>
58#include <string.h> 58#include <string.h>
59#include <unistd.h> 59#include <unistd.h>
60#include <paths.h> 60#include <nbcompat/paths.h>
61 61
62#include <nbcompat/db.h> 62#include <nbcompat/db.h>
63#include "btree.h" 63#include "btree.h"
64 64
65#ifdef DEBUG 65#ifdef DEBUG
66#undef MINPSIZE 66#undef MINPSIZE
67#define MINPSIZE 128 67#define MINPSIZE 128
68#endif 68#endif
69 69
70static int byteorder(void); 70static int byteorder(void);
71static int nroot(BTREE *); 71static int nroot(BTREE *);
72static int tmp(void); 72static int tmp(void);
73 73

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/libnbcompat/files/db/hash/hash_page.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/files/db/hash/hash_page.c 2008/10/10 00:21:43 1.1
+++ pkgsrc/pkgtools/libnbcompat/files/db/hash/hash_page.c 2008/10/28 17:57:36 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: hash_page.c,v 1.1 2008/10/10 00:21:43 joerg Exp $ */ 1/* $NetBSD: hash_page.c,v 1.2 2008/10/28 17:57:36 joerg Exp $ */
2/* NetBSD: hash_page.c,v 1.23 2008/09/11 12:58:00 joerg Exp */ 2/* NetBSD: hash_page.c,v 1.23 2008/09/11 12:58:00 joerg Exp */
3 3
4/*- 4/*-
5 * Copyright (c) 1990, 1993, 1994 5 * Copyright (c) 1990, 1993, 1994
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to Berkeley by 8 * This code is derived from software contributed to Berkeley by
9 * Margo Seltzer. 9 * Margo Seltzer.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,54 +26,54 @@ @@ -26,54 +26,54 @@
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE. 33 * SUCH DAMAGE.
34 */ 34 */
35 35
36#include <nbcompat.h> 36#include <nbcompat.h>
37#include <nbcompat/cdefs.h> 37#include <nbcompat/cdefs.h>
38 38
39__RCSID("$NetBSD: hash_page.c,v 1.1 2008/10/10 00:21:43 joerg Exp $"); 39__RCSID("$NetBSD: hash_page.c,v 1.2 2008/10/28 17:57:36 joerg Exp $");
40 40
41/* 41/*
42 * PACKAGE: hashing 42 * PACKAGE: hashing
43 * 43 *
44 * DESCRIPTION: 44 * DESCRIPTION:
45 * Page manipulation for hashing package. 45 * Page manipulation for hashing package.
46 * 46 *
47 * ROUTINES: 47 * ROUTINES:
48 * 48 *
49 * External 49 * External
50 * __get_page 50 * __get_page
51 * __add_ovflpage 51 * __add_ovflpage
52 * Internal 52 * Internal
53 * overflow_page 53 * overflow_page
54 * open_temp 54 * open_temp
55 */ 55 */
56 56
57#include <sys/types.h> 57#include <sys/types.h>
58 58
59#include <errno.h> 59#include <errno.h>
60#include <fcntl.h> 60#include <fcntl.h>
61#include <signal.h> 61#include <signal.h>
62#include <stdio.h> 62#include <stdio.h>
63#include <stdlib.h> 63#include <stdlib.h>
64#include <string.h> 64#include <string.h>
65#include <unistd.h> 65#include <unistd.h>
66#include <paths.h> 66#include <nbcompat/paths.h>
67#include <assert.h> 67#include <assert.h>
68 68
69#include <nbcompat/db.h> 69#include <nbcompat/db.h>
70#include "hash.h" 70#include "hash.h"
71#include "page.h" 71#include "page.h"
72#include "extern.h" 72#include "extern.h"
73 73
74static uint32_t *fetch_bitmap(HTAB *, int); 74static uint32_t *fetch_bitmap(HTAB *, int);
75static uint32_t first_free(uint32_t); 75static uint32_t first_free(uint32_t);
76static int open_temp(HTAB *); 76static int open_temp(HTAB *);
77static uint16_t overflow_page(HTAB *); 77static uint16_t overflow_page(HTAB *);
78static void putpair(char *, const DBT *, const DBT *); 78static void putpair(char *, const DBT *, const DBT *);
79static void squeeze_key(uint16_t *, const DBT *, const DBT *); 79static void squeeze_key(uint16_t *, const DBT *, const DBT *);