1 # ====================================================================
5 # C library time related configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
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 version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
47 #####DESCRIPTIONEND####
49 # ====================================================================
51 cdl_package CYGPKG_LIBC_TIME {
52 display "ISO C library date and time functions"
54 This package provides time functions specified by the
55 ISO C standard - ISO/IEC 9899:1990."
57 include_dir cyg/libc/time
59 implements CYGINT_ISO_C_TIME_TYPES
60 implements CYGINT_ISO_C_CLOCK_FUNCS
61 requires { CYGBLD_ISO_C_TIME_TYPES_HEADER == "<cyg/libc/time/time.h>" }
62 requires { CYGBLD_ISO_C_CLOCK_FUNCS_HEADER == \
63 "<cyg/libc/time/time.h>" }
64 requires CYGPKG_ISOINFRA
65 requires CYGINT_ISO_DIV
66 requires CYGINT_ISO_ABS
68 # Note: the POSIX files asctime_r,ctime_r,gmtime_r and
69 # localtime_r should be built all the time, not just in
70 # CYGFUN_LIBC_TIME_POSIX because the internal definitions
71 # are used by the ISO C functions regardless. Otherwise we
72 # get problems with certain inlining combinations. [Bug 1000001]
74 compile asctime.cxx clock.cxx \
75 ctime.cxx difftime.cxx \
76 gmtime.cxx localtime.cxx \
77 mktime.cxx settime.cxx \
78 strftime.cxx time.cxx \
79 timeutil.cxx asctime_r.cxx \
80 ctime_r.cxx gmtime_r.cxx \
84 # ====================================================================
86 cdl_option CYGSEM_LIBC_TIME_CLOCK_WORKING {
87 display "Working clock() function"
88 requires CYGFUN_KERNEL_THREADS_TIMER
89 requires CYGVAR_KERNEL_COUNTERS_CLOCK
92 This option controls whether clock() will
93 actually try and determine the process time
94 usage. With this option disabled, clock() does
95 not disappear, but will permanently return
96 (clock_t)-1 as mandated by the ISO C standard."
99 cdl_option CYGSEM_LIBC_TIME_TIME_WORKING {
100 display "Working time() function"
101 requires CYGPKG_IO_WALLCLOCK
104 This option controls whether time() will
105 actually try and determine the current calendar
106 time. With this option disabled, time() does
107 not disappear, but will permanently return
108 (time_t)-1 as mandated by the ISO C standard."
111 cdl_option CYGSEM_LIBC_TIME_SETTIME_WORKING {
112 display "Working cyg_libc_time_settime() function"
113 requires CYGPKG_IO_WALLCLOCK
116 This option controls whether cyg_libc_time_settime()
117 will actually try and set the current calendar
118 time. With this option disabled,
119 cyg_libc_time_settime() does not disappear, but
120 will permanently return an error."
123 cdl_option CYGFUN_LIBC_TIME_POSIX {
124 display "POSIX time functions"
126 requires CYGINT_ISO_STRING_BSD_FUNCS
129 Enabling this option allows the use of the
130 following functions defined in POSIX 1003.1:
131 asctime_r(), ctime_r(), gmtime_r(), strptime(), and
135 cdl_option CYGFUN_LIBC_TIME_SUS_EXTNS {
136 display "Single UNIX extensions"
139 Enabling this option allows the use of
140 certain additional conversion specifiers
141 in the strftime function."
144 cdl_component CYGPKG_LIBC_TIME_ZONES {
145 display "Time zone offsets"
148 These options control the default STandarD (STD)
149 and Daylight Savings Time (DST)
150 time offsets so that dates can be set correctly
151 for the local environment."
153 cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
154 display "Default Daylight Savings Time state"
156 legal_values -- -1 to 1
159 This option controls whether the initial
160 time environment is set up as STD, DST or
161 unknown. Use the value 1 for DST, 0 for STD,
162 and (-1) for unknown. This can also be set at
163 runtime using the cyg_libc_time_setdst()
167 cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
168 display "Default Standard Time offset"
170 legal_values -- -90000 to 90000
173 This option controls the offset from UTC in
174 seconds when in local Standard Time. This
175 value can be positive or negative. It
176 can also be set at run time using the
177 cyg_libc_time_setzoneoffsets() function."
180 cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
181 display "Default Daylight Savings Time offset"
183 legal_values -- -90000 to 90000
184 default_value -- 3600
186 This option controls the offset from UTC in
187 seconds when in local Daylight Savings Time. This
188 value can be positive or negative. It
189 can also be set at run time using the
190 cyg_libc_time_setzoneoffsets() function."
194 cdl_component CYGPKG_LIBC_TIME_INLINES {
195 display "Inline functions"
198 These options control whether certain functions
199 are available in inline form. This may lead to
200 faster code at the expense of code space. But for
201 some functions, or some functions with constant
202 arguments, it may in fact lead to smaller code."
204 cdl_option CYGIMP_LIBC_TIME_ASCTIME_INLINE {
208 Allow the asctime() function to be inlined"
211 cdl_option CYGIMP_LIBC_TIME_CTIME_INLINE {
215 Allow the ctime() function to be inlined"
218 cdl_option CYGIMP_LIBC_TIME_DIFFTIME_INLINE {
222 Allow the difftime() function to be inlined"
225 cdl_option CYGIMP_LIBC_TIME_GMTIME_INLINE {
229 Allow the gmtime() function to be inlined"
232 cdl_option CYGIMP_LIBC_TIME_LOCALTIME_INLINE {
233 display "localtime()"
236 Allow the localtime() function to be inlined"
239 cdl_option CYGIMP_LIBC_TIME_MKTIME_INLINE {
243 Allow the mktime() function to be inlined"
246 cdl_option CYGIMP_LIBC_TIME_ASCTIME_R_INLINE {
247 display "asctime_r()"
248 requires CYGFUN_LIBC_TIME_POSIX
251 Allow the asctime_r() function to be inlined"
254 cdl_option CYGIMP_LIBC_TIME_CTIME_R_INLINE {
256 requires CYGFUN_LIBC_TIME_POSIX
259 Allow the ctime_r() function to be inlined"
262 cdl_option CYGIMP_LIBC_TIME_GMTIME_R_INLINE {
264 requires CYGFUN_LIBC_TIME_POSIX
267 Allow the gmtime_r() function to be inlined"
270 cdl_option CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE {
271 display "localtime_r()"
272 requires CYGFUN_LIBC_TIME_POSIX
275 Allow the localtime_r() function to be inlined"
278 # FIXME: Also want "inline all" and "don't inline any" options which requires
279 # (or not) all the above, but
280 # if we do that then we will require the ones that also depend on
281 # CYGFUN_LIBC_TIME_POSIX :-( Wait for full CDL to fix this
283 cdl_option CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL {
284 display "clock() tracing level"
289 Trace verbosity level for debugging the clock()
290 function. Increase this value to get
291 additional trace output when tracing is enabled."
294 cdl_component CYGPKG_LIBC_TIME_OPTIONS {
295 display "C library time functions build options"
299 Package specific build options including control over
300 compiler flags used only in building this package,
301 and details of which tests are built."
304 cdl_option CYGPKG_LIBC_TIME_CFLAGS_ADD {
305 display "Additional compiler flags"
308 default_value { "-Wno-format" }
310 This option modifies the set of compiler flags for
311 building the C library. These flags are used in addition
312 to the set of global flags."
315 cdl_option CYGPKG_LIBC_TIME_CFLAGS_REMOVE {
316 display "Suppressed compiler flags"
321 This option modifies the set of compiler flags for
322 building the C library. These flags are removed from
323 the set of global flags if present."
326 cdl_option CYGPKG_LIBC_TIME_TESTS {
327 display "C library time and date function tests"
331 "tests/asctime tests/clock tests/ctime tests/gmtime tests/localtime tests/mktime tests/strftime tests/time "
332 . (CYGFUN_LIBC_TIME_POSIX ? "tests/strptime" : "")
335 This option specifies the set of tests for the C library
336 time and date functions."
341 # ====================================================================