Print this page
NEX-6096 Enable compile warnings re. parentheses in smbsrv
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/tzfile.h
+++ new/usr/src/uts/common/sys/tzfile.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.
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 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /*
27 27 * from Arthur Olson's 6.1
28 28 */
29 29
30 30 #ifndef _SYS_TZFILE_H
31 31 #define _SYS_TZFILE_H
32 32
33 33 #ifdef __cplusplus
34 34 extern "C" {
35 35 #endif
36 36
37 37 /*
38 38 * Information about time zone files.
39 39 */
40 40
41 41 #define TZDIR "/usr/share/lib/zoneinfo" /* Time zone object file directory */
42 42
43 43 #define TZDEFAULT (getenv("TZ"))
44 44
45 45 #define TZDEFRULES "posixrules"
46 46
47 47 /*
48 48 * Each file begins with. . .
49 49 */
50 50
51 51 struct tzhead {
52 52 char tzh_reserved[24]; /* reserved for future use */
53 53 char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
54 54 char tzh_leapcnt[4]; /* coded number of leap seconds */
55 55 char tzh_timecnt[4]; /* coded number of transition times */
56 56 char tzh_typecnt[4]; /* coded number of local time types */
57 57 char tzh_charcnt[4]; /* coded number of abbr. chars */
58 58 };
59 59
60 60 /*
61 61 * . . .followed by. . .
62 62 *
63 63 * tzh_timecnt (char [4])s coded transition times a la time(2)
64 64 * tzh_timecnt (unsigned char)s types of local time starting at above
65 65 * tzh_typecnt repetitions of
66 66 * one (char [4]) coded GMT offset in seconds
67 67 * one (unsigned char) used to set tm_isdst
68 68 * one (unsigned char) that's an abbreviation list index
69 69 * tzh_charcnt (char)s '\0'-terminated zone abbreviations
70 70 * tzh_leapcnt repetitions of
71 71 * one (char [4]) coded leap second transition times
72 72 * one (char [4]) total correction after above
73 73 * tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition
74 74 * time is standard time, if FALSE,
75 75 * transition time is wall clock time
76 76 * if absent, transition times are
77 77 * assumed to be wall clock time
78 78 */
79 79
80 80 /*
81 81 * In the current implementation, "tzset()" refuses to deal with files that
82 82 * exceed any of the limits below.
83 83 */
84 84
85 85 /*
86 86 * The TZ_MAX_TIMES value below is enough to handle a bit more than a
87 87 * year's worth of solar time (corrected daily to the nearest second) or
88 88 * 138 years of Pacific Presidential Election time
89 89 * (where there are three time zone transitions every fourth year).
90 90 */
91 91 #define TZ_MAX_TIMES 370
92 92
93 93 #define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
94 94
95 95 #define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
96 96
97 97 #define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
98 98
99 99 #define SECSPERMIN 60
100 100 #define MINSPERHOUR 60
101 101 #define HOURSPERDAY 24
102 102 #define DAYSPERWEEK 7
103 103 #define DAYSPERNYEAR 365
104 104 #define DAYSPERLYEAR 366
105 105 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
106 106 #define SECSPERDAY ((long)SECSPERHOUR * HOURSPERDAY)
107 107 #define MONSPERYEAR 12
108 108
109 109 #define TM_SUNDAY 0
110 110 #define TM_MONDAY 1
111 111 #define TM_TUESDAY 2
112 112 #define TM_WEDNESDAY 3
113 113 #define TM_THURSDAY 4
114 114 #define TM_FRIDAY 5
115 115 #define TM_SATURDAY 6
116 116
117 117 #define TM_JANUARY 0
118 118 #define TM_FEBRUARY 1
119 119 #define TM_MARCH 2
120 120 #define TM_APRIL 3
121 121 #define TM_MAY 4
122 122 #define TM_JUNE 5
123 123 #define TM_JULY 6
124 124 #define TM_AUGUST 7
125 125 #define TM_SEPTEMBER 8
126 126 #define TM_OCTOBER 9
127 127 #define TM_NOVEMBER 10
128 128 #define TM_DECEMBER 11
129 129
|
↓ open down ↓ |
129 lines elided |
↑ open up ↑ |
130 130 #define TM_YEAR_BASE 1900
131 131
132 132 #define EPOCH_YEAR 1970
133 133 #define EPOCH_WDAY TM_THURSDAY
134 134
135 135 /*
136 136 * Accurate only for the past couple of centuries;
137 137 * that will probably do.
138 138 */
139 139
140 -#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
140 +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
141 141
142 142 /*
143 143 * Use of the underscored variants may cause problems if you move your code to
144 144 * certain System-V-based systems; for maximum portability, use the
145 145 * underscore-free variants. The underscored variants are provided for
146 146 * backward compatibility only; they may disappear from future versions of
147 147 * this file.
148 148 */
149 149
150 150 #define SECS_PER_MIN SECSPERMIN
151 151 #define MINS_PER_HOUR MINSPERHOUR
152 152 #define HOURS_PER_DAY HOURSPERDAY
153 153 #define DAYS_PER_WEEK DAYSPERWEEK
154 154 #define DAYS_PER_NYEAR DAYSPERNYEAR
155 155 #define DAYS_PER_LYEAR DAYSPERLYEAR
156 156 #define SECS_PER_HOUR SECSPERHOUR
157 157 #define SECS_PER_DAY SECSPERDAY
158 158 #define MONS_PER_YEAR MONSPERYEAR
159 159
160 160 #ifdef __cplusplus
161 161 }
162 162 #endif
163 163
164 164 #endif /* _SYS_TZFILE_H */
|
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX