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.
12 ## Copyright (C) 2006 eCosCentric Ltd.
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
37 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38 ## at http://sources.redhat.com/ecos/ecos-license/
39 ## -------------------------------------------
40 #####ECOSGPLCOPYRIGHTEND####
41 # ====================================================================
42 ######DESCRIPTIONBEGIN####
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_LIBC_TIME {
53 display "ISO C library date and time functions"
55 This package provides time functions specified by the
56 ISO C standard - ISO/IEC 9899:1990."
58 include_dir cyg/libc/time
60 implements CYGINT_ISO_C_TIME_TYPES
61 implements CYGINT_ISO_C_CLOCK_FUNCS
62 requires { CYGBLD_ISO_C_TIME_TYPES_HEADER == "<cyg/libc/time/time.h>" }
63 requires { CYGBLD_ISO_C_CLOCK_FUNCS_HEADER == \
64 "<cyg/libc/time/time.h>" }
65 requires CYGPKG_ISOINFRA
66 requires CYGINT_ISO_DIV
67 requires CYGINT_ISO_ABS
69 # Note: the POSIX files asctime_r,ctime_r,gmtime_r and
70 # localtime_r should be built all the time, not just in
71 # CYGFUN_LIBC_TIME_POSIX because the internal definitions
72 # are used by the ISO C functions regardless. Otherwise we
73 # get problems with certain inlining combinations. [Bug 1000001]
75 compile asctime.cxx clock.cxx \
76 ctime.cxx difftime.cxx \
77 gmtime.cxx localtime.cxx \
78 mktime.cxx settime.cxx \
79 strftime.cxx time.cxx \
80 timeutil.cxx asctime_r.cxx \
81 ctime_r.cxx gmtime_r.cxx \
85 # ====================================================================
87 cdl_option CYGSEM_LIBC_TIME_CLOCK_WORKING {
88 display "Working clock() function"
89 requires CYGFUN_KERNEL_THREADS_TIMER
90 requires CYGVAR_KERNEL_COUNTERS_CLOCK
93 This option controls whether clock() will
94 actually try and determine the process time
95 usage. With this option disabled, clock() does
96 not disappear, but will permanently return
97 (clock_t)-1 as mandated by the ISO C standard."
100 cdl_option CYGSEM_LIBC_TIME_TIME_WORKING {
101 display "Working time() function"
102 requires CYGPKG_IO_WALLCLOCK
105 This option controls whether time() will
106 actually try and determine the current calendar
107 time. With this option disabled, time() does
108 not disappear, but will permanently return
109 (time_t)-1 as mandated by the ISO C standard."
112 cdl_option CYGSEM_LIBC_TIME_SETTIME_WORKING {
113 display "Working cyg_libc_time_settime() function"
114 requires CYGPKG_IO_WALLCLOCK
117 This option controls whether cyg_libc_time_settime()
118 will actually try and set the current calendar
119 time. With this option disabled,
120 cyg_libc_time_settime() does not disappear, but
121 will permanently return an error."
124 cdl_option CYGFUN_LIBC_TIME_POSIX {
125 display "POSIX time functions"
127 requires CYGINT_ISO_STRING_BSD_FUNCS
130 Enabling this option allows the use of the
131 following functions defined in POSIX 1003.1:
132 asctime_r(), ctime_r(), gmtime_r(), strptime(), and
136 cdl_option CYGFUN_LIBC_TIME_SUS_EXTNS {
137 display "Single UNIX extensions"
140 Enabling this option allows the use of
141 certain additional conversion specifiers
142 in the strftime function."
145 cdl_component CYGPKG_LIBC_TIME_ZONES {
146 display "Time zone offsets"
149 These options control the default STandarD (STD)
150 and Daylight Savings Time (DST)
151 time offsets so that dates can be set correctly
152 for the local environment."
154 cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_STATE {
155 display "Default Daylight Savings Time state"
157 legal_values -- -1 to 1
160 This option controls whether the initial
161 time environment is set up as STD, DST or
162 unknown. Use the value 1 for DST, 0 for STD,
163 and (-1) for unknown. This can also be set at
164 runtime using the cyg_libc_time_setdst()
168 cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
169 display "Default Standard Time offset"
171 legal_values -- -90000 to 90000
174 This option controls the offset from UTC in
175 seconds when in local Standard Time. This
176 value can be positive or negative. It
177 can also be set at run time using the
178 cyg_libc_time_setzoneoffsets() function."
181 cdl_option CYGNUM_LIBC_TIME_DST_DEFAULT_OFFSET {
182 display "Default Daylight Savings Time offset"
184 legal_values -- -90000 to 90000
185 default_value -- 3600
187 This option controls the offset from UTC in
188 seconds when in local Daylight Savings Time. This
189 value can be positive or negative. It
190 can also be set at run time using the
191 cyg_libc_time_setzoneoffsets() function."
195 cdl_component CYGPKG_LIBC_TIME_INLINES {
196 display "Inline functions"
199 These options control whether certain functions
200 are available in inline form. This may lead to
201 faster code at the expense of code space. But for
202 some functions, or some functions with constant
203 arguments, it may in fact lead to smaller code."
205 cdl_option CYGIMP_LIBC_TIME_ASCTIME_INLINE {
209 Allow the asctime() function to be inlined"
212 cdl_option CYGIMP_LIBC_TIME_CTIME_INLINE {
216 Allow the ctime() function to be inlined"
219 cdl_option CYGIMP_LIBC_TIME_DIFFTIME_INLINE {
223 Allow the difftime() function to be inlined"
226 cdl_option CYGIMP_LIBC_TIME_GMTIME_INLINE {
230 Allow the gmtime() function to be inlined"
233 cdl_option CYGIMP_LIBC_TIME_LOCALTIME_INLINE {
234 display "localtime()"
237 Allow the localtime() function to be inlined"
240 cdl_option CYGIMP_LIBC_TIME_MKTIME_INLINE {
244 Allow the mktime() function to be inlined"
247 cdl_option CYGIMP_LIBC_TIME_ASCTIME_R_INLINE {
248 display "asctime_r()"
249 requires CYGFUN_LIBC_TIME_POSIX
252 Allow the asctime_r() function to be inlined"
255 cdl_option CYGIMP_LIBC_TIME_CTIME_R_INLINE {
257 requires CYGFUN_LIBC_TIME_POSIX
260 Allow the ctime_r() function to be inlined"
263 cdl_option CYGIMP_LIBC_TIME_GMTIME_R_INLINE {
265 requires CYGFUN_LIBC_TIME_POSIX
268 Allow the gmtime_r() function to be inlined"
271 cdl_option CYGIMP_LIBC_TIME_LOCALTIME_R_INLINE {
272 display "localtime_r()"
273 requires CYGFUN_LIBC_TIME_POSIX
276 Allow the localtime_r() function to be inlined"
279 # FIXME: Also want "inline all" and "don't inline any" options which requires
280 # (or not) all the above, but
281 # if we do that then we will require the ones that also depend on
282 # CYGFUN_LIBC_TIME_POSIX :-( Wait for full CDL to fix this
284 cdl_option CYGNUM_LIBC_TIME_CLOCK_TRACE_LEVEL {
285 display "clock() tracing level"
290 Trace verbosity level for debugging the clock()
291 function. Increase this value to get
292 additional trace output when tracing is enabled."
295 cdl_component CYGPKG_LIBC_TIME_OPTIONS {
296 display "C library time functions build options"
300 Package specific build options including control over
301 compiler flags used only in building this package,
302 and details of which tests are built."
305 cdl_option CYGPKG_LIBC_TIME_CFLAGS_ADD {
306 display "Additional compiler flags"
309 default_value { "-Wno-format" }
311 This option modifies the set of compiler flags for
312 building the C library. These flags are used in addition
313 to the set of global flags."
316 cdl_option CYGPKG_LIBC_TIME_CFLAGS_REMOVE {
317 display "Suppressed compiler flags"
322 This option modifies the set of compiler flags for
323 building the C library. These flags are removed from
324 the set of global flags if present."
327 cdl_option CYGPKG_LIBC_TIME_TESTS {
328 display "C library time and date function tests"
332 "tests/asctime tests/clock tests/ctime tests/gmtime tests/localtime tests/mktime tests/strftime tests/time "
333 . (CYGFUN_LIBC_TIME_POSIX ? "tests/strptime" : "")
336 This option specifies the set of tests for the C library
337 time and date functions."
342 # ====================================================================