Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/deflt.h
+++ new/usr/src/head/deflt.h
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 (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 + *
22 24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 25 * Use is subject to license terms.
24 26 */
25 27
26 28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 29 /* All Rights Reserved */
28 30
29 31 /* Copyright (c) 1987, 1988 Microsoft Corporation */
30 32 /* All Rights Reserved */
31 33
32 34 #ifndef _DEFLT_H
33 35 #define _DEFLT_H
34 36
35 37 #ifdef __cplusplus
36 38 extern "C" {
37 39 #endif
38 40
39 41 #define DEFLT "/etc/default"
40 42
41 43 /*
42 44 * Following for defcntl(3).
43 45 * If you add new args, make sure that the default is:
44 46 * OFF new-improved-feature-off, i.e. current state of affairs
45 47 * ON new-improved-feature-on
46 48 * or that you change the code for deflt(3) to have the old value as the
47 49 * default. (for compatibility).
48 50 */
49 51
50 52 /* ... cmds */
51 53 #define DC_GETFLAGS 0 /* get current flags */
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
52 54 #define DC_SETFLAGS 1 /* set flags */
53 55
54 56 /* ... args */
55 57 #define DC_CASE 0001 /* ON: respect case; OFF: ignore case */
56 58 #define DC_NOREWIND 0002 /* ON: don't rewind in defread */
57 59 /* OFF: do rewind in defread */
58 60 #define DC_STRIP_QUOTES 0004 /* ON: strip quotes; OFF: leave quotes */
59 61
60 62 #define DC_STD ((0) | (DC_CASE))
61 63
62 -#ifdef __STDC__
63 64 extern int defcntl(int, int);
64 65 extern int defopen(char *);
65 66 extern char *defread(char *);
66 67
67 68 extern int defcntl_r(int, int, void *);
68 69 extern void *defopen_r(const char *);
69 70 extern char *defread_r(const char *, void *);
70 71 extern void defclose_r(void *);
71 -#else
72 -extern int defcntl();
73 -extern int defopen();
74 -extern char *defread();
75 72
76 -extern int defcntl_r();
77 -extern void *defopen_r();
78 -extern char *defread_r();
79 -extern void defclose_r();
80 -#endif
81 -
82 73 #define TURNON(flags, mask) ((flags) |= (mask))
83 74 #define TURNOFF(flags, mask) ((flags) &= ~(mask))
84 75 #define ISON(flags, mask) (((flags) & (mask)) == (mask))
85 76 #define ISOFF(flags, mask) (((flags) & (mask)) != (mask))
86 77
87 78 #ifdef __cplusplus
88 79 }
89 80 #endif
90 81
91 82 #endif /* _DEFLT_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX