1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# time.cdl
|
4 |
|
|
#
|
5 |
|
|
# C library time related configuration data
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
## ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
|
12 |
|
|
##
|
13 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
## the terms of the GNU General Public License as published by the Free
|
15 |
|
|
## Software Foundation; either version 2 or (at your option) any later
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): jlarmour
|
43 |
|
|
# Contributors:
|
44 |
|
|
# Date: 2000-04-14
|
45 |
|
|
#
|
46 |
|
|
#####DESCRIPTIONEND####
|
47 |
|
|
#
|
48 |
|
|
# ====================================================================
|
49 |
|
|
|
50 |
|
|
cdl_package CYGPKG_LIBC_TIME {
|
51 |
|
|
display "ISO C library date and time functions"
|
52 |
|
|
description "
|
53 |
|
|
This package provides time functions specified by the
|
54 |
|
|
ISO C standard - ISO/IEC 9899:1990."
|
55 |
|
|
doc ref/libc.html
|
56 |
|
|
include_dir cyg/libc/time
|
57 |
|
|
parent CYGPKG_LIBC
|
58 |
|
|
implements CYGINT_ISO_C_TIME_TYPES
|
59 |
|
|
implements CYGINT_ISO_C_CLOCK_FUNCS
|
60 |
|
|
requires { CYGBLD_ISO_C_TIME_TYPES_HEADER == "" }
|
61 |
|
|
requires { CYGBLD_ISO_C_CLOCK_FUNCS_HEADER == \
|
62 |
|
|
"" }
|
63 |
|
|
requires CYGPKG_ISOINFRA
|
64 |
|
|
requires CYGINT_ISO_DIV
|
65 |
|
|
requires CYGINT_ISO_ABS
|
66 |
|
|
|
67 |
|
|
# Note: the POSIX files asctime_r,ctime_r,gmtime_r and
|
68 |
|
|
# localtime_r should be built all the time, not just in
|
69 |
|
|
# CYGFUN_LIBC_TIME_POSIX because the internal definitions
|
70 |
|
|
# are used by the ISO C functions regardless. Otherwise we
|
71 |
|
|
# get problems with certain inlining combinations. [Bug 1000001]
|
72 |
|
|
|
73 |
|
|
compile asctime.cxx clock.cxx \
|
74 |
|
|
ctime.cxx difftime.cxx \
|
75 |
|
|
gmtime.cxx localtime.cxx \
|
76 |
|
|
mktime.cxx settime.cxx \
|
77 |
|
|
strftime.cxx time.cxx \
|
78 |
|
|
timeutil.cxx asctime_r.cxx \
|
79 |
|
|
ctime_r.cxx gmtime_r.cxx \
|
80 |
|
|
localtime_r.cxx
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
# ====================================================================
|
84 |
|
|
|
85 |
|
|
cdl_option CYGSEM_LIBC_TIME_CLOCK_WORKING {
|
86 |
|
|
display "Working clock() function"
|
87 |
|
|
requires CYGFUN_KERNEL_THREADS_TIMER
|
88 |
|
|
requires CYGVAR_KERNEL_COUNTERS_CLOCK
|
89 |
|
|
default_value 1
|
90 |
|
|
description "
|
91 |
|
|
This option controls whether clock() will
|
92 |
|
|
actually try and determine the process time
|
93 |
|
|
usage. With this option disabled, clock() does
|
94 |
|
|
not disappear, but will permanently return
|
95 |
|
|
(clock_t)-1 as mandated by the ISO C standard."
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
cdl_option CYGSEM_LIBC_TIME_TIME_WORKING {
|
99 |
|
|
display "Working time() function"
|
100 |
|
|
requires CYGPKG_IO_WALLCLOCK
|
101 |
|
|
default_value 1
|
102 |
|
|
description "
|
103 |
|
|
This option controls whether time() will
|
104 |
|
|
actually try and determine the current calendar
|
105 |
|
|
time. With this option disabled, time() does
|
106 |
|
|
not disappear, but will permanently return
|
107 |
|
|
(time_t)-1 as mandated by the ISO C standard."
|
108 |
|
|
}
|
109 |
|
|
|
110 |
|
|
cdl_option CYGSEM_LIBC_TIME_SETTIME_WORKING {
|
111 |
|
|
display "Working cyg_libc_time_settime() function"
|
112 |
|
|
requires CYGPKG_IO_WALLCLOCK
|
113 |
|
|
default_value 1
|
114 |
|
|
description "
|
115 |
|
|
This option controls whether cyg_libc_time_settime()
|
116 |
|
|
will actually try and set the current calendar
|
117 |
|
|
time. With this option disabled,
|
118 |
|
|
cyg_libc_time_settime() does not disappear, but
|
119 |
|
|
will permanently return an error."
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
cdl_option CYGFUN_LIBC_TIME_POSIX {
|
123 |
|
|
display "POSIX time functions"
|
124 |
|
|
default_value 1
|
125 |
|
|
requires CYGINT_ISO_STRING_BSD_FUNCS
|
126 |
|
|
compile strptime.cxx
|
127 |
|
|
description "
|
128 |
|
|
Enabling this option allows the use of the
|
129 |
|
|
following functions defined in POSIX 1003.1:
|
130 |
|
|
asctime_r(), ctime_r(), gmtime_r(), strptime(), and
|
131 |
|
|
localtime_r()."
|
132 |
|
|
}
|
133 |
|
|
|
134 |
|
|
cdl_option CYGFUN_LIBC_TIME_SUS_EXTNS {
|
135 |
|
|
display "Single UNIX extensions"
|
136 |
|
|
default_value 0
|
137 |
|
|
description "
|
138 |
|
|
Enabling this option allows the use of
|
139 |
|
|
certain additional conversion specifiers
|
140 |
|
|
in the strftime function."
|
141 |
|
|
}
|
142 |
|
|
|
143 |
|
|
cdl_component CYGPKG_LIBC_TIME_ZONES {
|
144 |
|
|
display "Time zone offsets"
|
145 |
|
|
flavor none
|
146 |
|
|
description "
|
147 |
|
|
These options control the default STandarD (STD)
|
148 |
|
|
and Daylight Savings Time (DST)
|
149 |
|
|
time offsets so that dates can be set correctly
|
150 |
|
|
for the local environment."
|
151 |
|
|
|
152 |
|
|
cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
|
153 |
|
|
display "Default Daylight Savings Time state"
|
154 |
|
|
flavor data
|
155 |
|
|
legal_values -- -1 to 1
|
156 |
|
|
default_value -- -1
|
157 |
|
|
description "
|
158 |
|
|
This option controls whether the initial
|
159 |
|
|
time environment is set up as STD, DST or
|
160 |
|
|
unknown. Use the value 1 for DST, 0 for STD,
|
161 |
|
|
and (-1) for unknown. This can also be set at
|
162 |
|
|
runtime using the cyg_libc_time_setdst()
|
163 |
|
|
function."
|
164 |
|
|
}
|
165 |
|
|
|
166 |
|
|
cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
|
167 |
|
|
display "Default Standard Time offset"
|
168 |
|
|
flavor data
|
169 |
|
|
legal_values -- -90000 to 90000
|
170 |
|
|
default_value -- 0
|
171 |
|
|
description "
|
172 |
|
|
This option controls the offset from UTC in
|
173 |
|
|
seconds when in local Standard Time. This
|
174 |
|
|
value can be positive or negative. It
|
175 |
|
|
can also be set at run time using the
|
176 |
|
|
cyg_libc_time_setzoneoffsets() function."
|
177 |
|
|
}
|
178 |
|
|
|
179 |
|
|
cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
|
180 |
|
|
display "Default Daylight Savings Time offset"
|
181 |
|
|
flavor data
|
182 |
|
|
legal_values -- -90000 to 90000
|
183 |
|
|
default_value -- 3600
|
184 |
|
|
description "
|
185 |
|
|
This option controls the offset from UTC in
|
186 |
|
|
seconds when in local Daylight Savings Time. This
|
187 |
|
|
value can be positive or negative. It
|
188 |
|
|
can also be set at run time using the
|
189 |
|
|
cyg_libc_time_setzoneoffsets() function."
|
190 |
|
|
}
|
191 |
|
|
}
|
192 |
|
|
|
193 |
|
|
cdl_component CYGPKG_LIBC_TIME_INLINES {
|
194 |
|
|
display "Inline functions"
|
195 |
|
|
flavor none
|
196 |
|
|
description "
|
197 |
|
|
These options control whether certain functions
|
198 |
|
|
are available in inline form. This may lead to
|
199 |
|
|
faster code at the expense of code space. But for
|
200 |
|
|
some functions, or some functions with constant
|
201 |
|
|
arguments, it may in fact lead to smaller code."
|
202 |
|
|
|
203 |
|
|
cdl_option CYGIMP_LIBC_TIME_ASCTIME_INLINE {
|
204 |
|
|
display "asctime()"
|
205 |
|
|
default_value 1
|
206 |
|
|
description "
|
207 |
|
|
Allow the asctime() function to be inlined"
|
208 |
|
|
}
|
209 |
|
|
|
210 |
|
|
cdl_option CYGIMP_LIBC_TIME_CTIME_INLINE {
|
211 |
|
|
display "ctime()"
|
212 |
|
|
default_value 1
|
213 |
|
|
description "
|
214 |
|
|
Allow the ctime() function to be inlined"
|
215 |
|
|
}
|
216 |
|
|
|
217 |
|
|
cdl_option CYGIMP_LIBC_TIME_DIFFTIME_INLINE {
|
218 |
|
|
display "difftime()"
|
219 |
|
|
default_value 1
|
220 |
|
|
description "
|
221 |
|
|
Allow the difftime() function to be inlined"
|
222 |
|
|
}
|
223 |
|
|
|
224 |
|
|
cdl_option CYGIMP_LIBC_TIME_GMTIME_INLINE {
|
225 |
|
|
display "gmtime()"
|
226 |
|
|
default_value 1
|
227 |
|
|
description "
|
228 |
|
|
Allow the gmtime() function to be inlined"
|
229 |
|
|
}
|
230 |
|
|
|
231 |
|
|
cdl_option CYGIMP_LIBC_TIME_LOCALTIME_INLINE {
|
232 |
|
|
display "localtime()"
|
233 |
|
|
default_value 1
|
234 |
|
|
description "
|
235 |
|
|
Allow the localtime() function to be inlined"
|
236 |
|
|
}
|
237 |
|
|
|
238 |
|
|
cdl_option CYGIMP_LIBC_TIME_MKTIME_INLINE {
|
239 |
|
|
display "mktime()"
|
240 |
|
|
default_value 0
|
241 |
|
|
description "
|
242 |
|
|
Allow the mktime() function to be inlined"
|
243 |
|
|
}
|
244 |
|
|
|
245 |
|
|
cdl_option CYGIMP_LIBC_TIME_ASCTIME_R_INLINE {
|
246 |
|
|
display "asctime_r()"
|
247 |
|
|
requires CYGFUN_LIBC_TIME_POSIX
|
248 |
|
|
default_value 1
|
249 |
|
|
description "
|
250 |
|
|
Allow the asctime_r() function to be inlined"
|
251 |
|
|
}
|
252 |
|
|
|
253 |
|
|
cdl_option CYGIMP_LIBC_TIME_CTIME_R_INLINE {
|
254 |
|
|
display "ctime_r()"
|
255 |
|
|
requires CYGFUN_LIBC_TIME_POSIX
|
256 |
|
|
default_value 1
|
257 |
|
|
description "
|
258 |
|
|
Allow the ctime_r() function to be inlined"
|
259 |
|
|
}
|
260 |
|
|
|
261 |
|
|
cdl_option CYGIMP_LIBC_TIME_GMTIME_R_INLINE {
|
262 |
|
|
display "gmtime_r()"
|
263 |
|
|
requires CYGFUN_LIBC_TIME_POSIX
|
264 |
|
|
default_value 0
|
265 |
|
|
description "
|
266 |
|
|
Allow the gmtime_r() function to be inlined"
|
267 |
|
|
}
|
268 |
|
|
|
269 |
|
|
cdl_option CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE {
|
270 |
|
|
display "localtime_r()"
|
271 |
|
|
requires CYGFUN_LIBC_TIME_POSIX
|
272 |
|
|
default_value 1
|
273 |
|
|
description "
|
274 |
|
|
Allow the localtime_r() function to be inlined"
|
275 |
|
|
}
|
276 |
|
|
}
|
277 |
|
|
# FIXME: Also want "inline all" and "don't inline any" options which requires
|
278 |
|
|
# (or not) all the above, but
|
279 |
|
|
# if we do that then we will require the ones that also depend on
|
280 |
|
|
# CYGFUN_LIBC_TIME_POSIX :-( Wait for full CDL to fix this
|
281 |
|
|
|
282 |
|
|
cdl_option CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL {
|
283 |
|
|
display "clock() tracing level"
|
284 |
|
|
flavor data
|
285 |
|
|
legal_values 0 to 1
|
286 |
|
|
default_value 0
|
287 |
|
|
description "
|
288 |
|
|
Trace verbosity level for debugging the clock()
|
289 |
|
|
function. Increase this value to get
|
290 |
|
|
additional trace output when tracing is enabled."
|
291 |
|
|
}
|
292 |
|
|
|
293 |
|
|
cdl_component CYGPKG_LIBC_TIME_OPTIONS {
|
294 |
|
|
display "C library time functions build options"
|
295 |
|
|
flavor none
|
296 |
|
|
no_define
|
297 |
|
|
description "
|
298 |
|
|
Package specific build options including control over
|
299 |
|
|
compiler flags used only in building this package,
|
300 |
|
|
and details of which tests are built."
|
301 |
|
|
|
302 |
|
|
|
303 |
|
|
cdl_option CYGPKG_LIBC_TIME_CFLAGS_ADD {
|
304 |
|
|
display "Additional compiler flags"
|
305 |
|
|
flavor data
|
306 |
|
|
no_define
|
307 |
|
|
default_value { "-Wno-format" }
|
308 |
|
|
description "
|
309 |
|
|
This option modifies the set of compiler flags for
|
310 |
|
|
building the C library. These flags are used in addition
|
311 |
|
|
to the set of global flags."
|
312 |
|
|
}
|
313 |
|
|
|
314 |
|
|
cdl_option CYGPKG_LIBC_TIME_CFLAGS_REMOVE {
|
315 |
|
|
display "Suppressed compiler flags"
|
316 |
|
|
flavor data
|
317 |
|
|
no_define
|
318 |
|
|
default_value { "" }
|
319 |
|
|
description "
|
320 |
|
|
This option modifies the set of compiler flags for
|
321 |
|
|
building the C library. These flags are removed from
|
322 |
|
|
the set of global flags if present."
|
323 |
|
|
}
|
324 |
|
|
|
325 |
|
|
cdl_option CYGPKG_LIBC_TIME_TESTS {
|
326 |
|
|
display "C library time and date function tests"
|
327 |
|
|
flavor data
|
328 |
|
|
no_define
|
329 |
|
|
calculated {
|
330 |
|
|
"tests/asctime tests/clock tests/ctime tests/gmtime tests/localtime tests/mktime tests/strftime tests/time "
|
331 |
|
|
. (CYGFUN_LIBC_TIME_POSIX ? "tests/strptime" : "")
|
332 |
|
|
}
|
333 |
|
|
description "
|
334 |
|
|
This option specifies the set of tests for the C library
|
335 |
|
|
time and date functions."
|
336 |
|
|
}
|
337 |
|
|
}
|
338 |
|
|
}
|
339 |
|
|
|
340 |
|
|
# ====================================================================
|
341 |
|
|
# EOF time.cdl
|