Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/mkdev.h
+++ new/usr/src/uts/common/sys/mkdev.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 #ifndef _SYS_MKDEV_H
30 32 #define _SYS_MKDEV_H
31 33
32 34 #include <sys/types.h>
33 35
34 36 #ifdef __cplusplus
35 37 extern "C" {
36 38 #endif
37 39
38 40 /*
39 41 * SVR3/Pre-EFT device number constants.
40 42 */
41 43 #define ONBITSMAJOR 7 /* # of SVR3 major device bits */
42 44 #define ONBITSMINOR 8 /* # of SVR3 minor device bits */
43 45 #define OMAXMAJ 0x7f /* SVR3 max major value */
44 46 #define OMAXMIN 0xff /* SVR3 max major value */
45 47
46 48 /*
47 49 * 32-bit Solaris device major/minor sizes.
48 50 */
49 51 #define NBITSMAJOR32 14
50 52 #define NBITSMINOR32 18
51 53 #define MAXMAJ32 0x3ffful /* SVR4 max major value */
52 54 #define MAXMIN32 0x3fffful /* SVR4 max minor value */
53 55
54 56 #define NBITSMAJOR64 32 /* # of major device bits in 64-bit Solaris */
55 57 #define NBITSMINOR64 32 /* # of minor device bits in 64-bit Solaris */
56 58
57 59 #ifdef _LP64
58 60
59 61 #define MAXMAJ64 0xfffffffful /* max major value */
60 62 #define MAXMIN64 0xfffffffful /* max minor value */
61 63
62 64 #define NBITSMAJOR NBITSMAJOR64
63 65 #define NBITSMINOR NBITSMINOR64
64 66 #define MAXMAJ MAXMAJ64
65 67 #define MAXMIN MAXMIN64
66 68
67 69 #else /* !_LP64 */
68 70
69 71 #define NBITSMAJOR NBITSMAJOR32
70 72 #define NBITSMINOR NBITSMINOR32
71 73 #define MAXMAJ MAXMAJ32
72 74 #define MAXMIN MAXMIN32
73 75
74 76 #endif /* !_LP64 */
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
75 77
76 78 #if !defined(_KERNEL)
77 79
78 80 /*
79 81 * Undefine sysmacros.h device macros.
80 82 */
81 83 #undef makedev
82 84 #undef major
83 85 #undef minor
84 86
85 -#if defined(__STDC__)
86 -
87 87 extern dev_t makedev(const major_t, const minor_t);
88 88 extern major_t major(const dev_t);
89 89 extern minor_t minor(const dev_t);
90 90 extern dev_t __makedev(const int, const major_t, const minor_t);
91 91 extern major_t __major(const int, const dev_t);
92 92 extern minor_t __minor(const int, const dev_t);
93 93
94 -#else
95 -
96 -extern dev_t makedev();
97 -extern major_t major();
98 -extern minor_t minor();
99 -extern dev_t __makedev();
100 -extern major_t __major();
101 -extern minor_t __minor();
102 -
103 -#endif /* defined(__STDC__) */
104 -
105 94 #define OLDDEV 0 /* old device format */
106 95 #define NEWDEV 1 /* new device format */
107 96
108 97 #define makedev(maj, min) (__makedev(NEWDEV, maj, min))
109 98 #define major(dev) (__major(NEWDEV, dev))
110 99 #define minor(dev) (__minor(NEWDEV, dev))
111 100
112 101 #endif /* !defined(_KERNEL) */
113 102
114 103 #ifdef __cplusplus
115 104 }
116 105 #endif
117 106
118 107 #endif /* _SYS_MKDEV_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX