mega_sas: suppress set but not used warnings
[unleashed.git] / include / deflt.h
blob735da17b043c4e4c728b48fa460056ad034aeb30
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
29 /* All Rights Reserved */
31 /* Copyright (c) 1987, 1988 Microsoft Corporation */
32 /* All Rights Reserved */
34 #ifndef _DEFLT_H
35 #define _DEFLT_H
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
41 #define DEFLT "/etc/default"
44 * Following for defcntl(3).
45 * If you add new args, make sure that the default is:
46 * OFF new-improved-feature-off, i.e. current state of affairs
47 * ON new-improved-feature-on
48 * or that you change the code for deflt(3) to have the old value as the
49 * default. (for compatibility).
52 /* ... cmds */
53 #define DC_GETFLAGS 0 /* get current flags */
54 #define DC_SETFLAGS 1 /* set flags */
56 /* ... args */
57 #define DC_CASE 0001 /* ON: respect case; OFF: ignore case */
58 #define DC_NOREWIND 0002 /* ON: don't rewind in defread */
59 /* OFF: do rewind in defread */
60 #define DC_STRIP_QUOTES 0004 /* ON: strip quotes; OFF: leave quotes */
62 #define DC_STD ((0) | (DC_CASE))
64 extern int defcntl(int, int);
65 extern int defopen(char *);
66 extern char *defread(char *);
68 extern int defcntl_r(int, int, void *);
69 extern void *defopen_r(const char *);
70 extern char *defread_r(const char *, void *);
71 extern void defclose_r(void *);
73 #define TURNON(flags, mask) ((flags) |= (mask))
74 #define TURNOFF(flags, mask) ((flags) &= ~(mask))
75 #define ISON(flags, mask) (((flags) & (mask)) == (mask))
76 #define ISOFF(flags, mask) (((flags) & (mask)) != (mask))
78 #ifdef __cplusplus
80 #endif
82 #endif /* _DEFLT_H */