Print this page
5910 libnisdb won't build with modern GCC
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libnisdb/db_entry_c.x
+++ new/usr/src/lib/libnisdb/db_entry_c.x
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * db_entry_c.x
24 24 *
25 + * Copyright 2015 Gary Mills
25 26 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 27 * Use is subject to license terms.
27 28 */
28 29
29 -%#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 30 /*
32 31 * Some manifest constants, chosen to maximize flexibility without
33 32 * plugging the wire full of data.
34 33 */
35 34
36 35 #if RPC_HDR
37 36 %#ifndef _DB_NIS_H
38 37 %#define _DB_NIS_H
39 38
40 39 %#include <rpcsvc/nis.h>
41 40 #endif /* RPC_HDR */
42 41
42 +#if RPC_XDR
43 +%#include "nis_clnt.h"
44 +#endif /* RPC_XDR */
45 +
43 46 #ifdef USINGC
44 47 enum db_status {DB_SUCCESS, DB_NOTFOUND, DB_NOTUNIQUE,
45 48 DB_BADTABLE, DB_BADQUERY, DB_BADOBJECT,
46 49 DB_MEMORY_LIMIT, DB_STORAGE_LIMIT, DB_INTERNAL_ERROR};
47 50
48 51 enum db_action {DB_LOOKUP, DB_REMOVE, DB_ADD, DB_FIRST, DB_NEXT,
49 52 DB_ALL, DB_RESET_NEXT, DB_ADD_NOLOG,
50 53 DB_ADD_NOSYNC, DB_REMOVE_NOSYNC };
51 54 #endif /* USINGC */
52 55
53 56 /* Make alias to NIS definition */
54 57
55 58 typedef entry_obj entry_object;
56 59 typedef entry_object * entry_object_p;
57 60
58 61 typedef nis_name db_stringname;
59 62 typedef nis_attr db_attrname; /* What the database knows it as */
60 63
61 64
62 65 /* nis_dba.x ----------------------------- */
63 66
64 67 /*
65 68 * Structure definitions for the parameters and results of the actual
66 69 * NIS DBA calls
67 70 *
68 71 * This is the standard result (in the protocol) of most of the nis
69 72 * requests.
70 73 */
71 74
72 75 /*typedef long db_next_desc;*/
73 76
74 77 typedef opaque db_next_desc<>; /* opaque string */
75 78
76 79 struct db_result {
77 80 db_status status; /* The status itself */
78 81 db_next_desc nextinfo; /* for first/next sequence */
79 82 entry_object_p objects<>; /* And the objects found */
80 83 long ticks; /* for statistics */
81 84 };
82 85
83 86 struct db_request {
84 87 db_stringname table_name;
85 88 db_attrname attrs<NIS_MAXCOLUMNS>;
86 89 entry_object * obj; /* only used for addition */
87 90 };
88 91
89 92 #ifndef USINGC
90 93 %#ifdef __cplusplus
91 94 %extern "C" entry_object * new_entry( entry_object*);
92 95 %extern "C" bool_t copy_entry ( entry_object*, entry_object*);
93 96 %extern "C" void free_entry (entry_object*);
94 97 %extern "C" bool_t sameEntry(entry_object *, entry_object *);
95 98 %#elif __STDC__
96 99 %extern entry_object * new_entry( entry_object*);
97 100 %extern bool_t copy_entry ( entry_object*, entry_object*);
98 101 %extern void free_entry (entry_object*);
99 102 %extern bool_t sameEntry(entry_object *, entry_object *);
100 103 %#endif
101 104 #else
102 105 #if RPC_HDR
103 106 %extern void print_entry();
104 107 %extern char copy_entry();
105 108 %extern void free_entry();
106 109 %extern void new_entry();
107 110 #endif /* RPC_HDR */
108 111 #endif /* USINGC */
109 112
110 113 #if RPC_HDR
111 114 %#endif /* _DB_NIS_H */
112 115 #endif /* RPC_HDR */
↓ open down ↓ |
60 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX