OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [language/] [c/] [libc/] [stdio/] [current/] [cdl/] [stdio.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      stdio.cdl
4
#
5
#      C library stdio 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, 2009 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_STDIO {
51
    display       "ISO C library standard input/output functions"
52
    description   "
53
        This package provides standard input/output functions associated
54
        with the header file  as specified by the
55
        ISO C standard - ISO/IEC 9899:1990."
56
    doc           ref/libc.html
57
    include_dir   cyg/libc/stdio
58
    parent        CYGPKG_LIBC
59
    requires      CYGPKG_IO
60
    requires      CYGPKG_LIBC_I18N
61
    implements    CYGINT_ISO_STDIO_FILETYPES
62
    implements    CYGINT_ISO_STDIO_FILEACCESS
63
    implements    CYGINT_ISO_STDIO_FILEPOS
64
    implements    CYGINT_ISO_STDIO_FILEOPS
65
    implements    CYGINT_ISO_STDIO_FORMATTED_IO
66
    implements    CYGINT_ISO_STDIO_CHAR_IO
67
    implements    CYGINT_ISO_STDIO_DIRECT_IO
68
    implements    CYGINT_ISO_STDIO_ERROR
69
    implements    CYGINT_ISO_STDIO_STREAMS
70
    requires      { (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE == "\"/dev/ttydiag\"" ? \
71
                  CYGPKG_IO_SERIAL_HALDIAG : 1) }
72
    requires      { CYGBLD_ISO_STDIO_FILETYPES_HEADER == \
73
                    "" }
74
    requires      { CYGBLD_ISO_STDIO_FILEACCESS_HEADER == \
75
                    "" }
76
    requires      { CYGBLD_ISO_STDIO_FILEPOS_HEADER == \
77
                    "" }
78
    requires      { CYGBLD_ISO_STDIO_FILEOPS_HEADER == \
79
                    "" }
80
    requires      { CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER == \
81
                    "" }
82
    requires      { CYGBLD_ISO_STDIO_CHAR_IO_HEADER == \
83
                    "" }
84
    requires      { CYGBLD_ISO_STDIO_DIRECT_IO_HEADER == \
85
                    "" }
86
    requires      { CYGBLD_ISO_STDIO_ERROR_HEADER == \
87
                    "" }
88
    requires      { CYGBLD_ISO_STDIO_STREAMS_HEADER == \
89
                    "" }
90
    requires      CYGPKG_ISOINFRA
91
    requires      CYGINT_ISO_ERRNO_CODES
92
    requires      CYGINT_ISO_ERRNO
93
    requires      CYGINT_ISO_STRERROR
94
    requires      CYGINT_ISO_STRING_STRFUNCS
95
    requires      CYGINT_ISO_STRING_MEMFUNCS
96
    # The following is for scanf only. We could express this better,
97
    # particularly since scanf is also dependent on the optional ungetc.
98
    requires      CYGINT_ISO_STDLIB_STRCONV
99
 
100
    compile       common/fflush.cxx       common/feof.cxx        \
101
                  common/freopen.cxx      common/setvbuf.cxx     \
102
                  common/snprintf.cxx     common/sprintf.cxx     \
103
                  common/sscanf.cxx       common/stderr.cxx      \
104
                  common/stdin.cxx        common/stdiofiles.cxx  \
105
                  common/fseek.cxx        common/stdioinlines.cxx\
106
                  common/stdiosupp.cxx    common/stdout.cxx      \
107
                  common/stream.cxx       common/streambuf.cxx   \
108
                  common/ungetc.cxx       common/vsnprintf.cxx   \
109
                  common/vsscanf.cxx      common/fileops.cxx     \
110
                                                                 \
111
                  input/fgetc.cxx         input/fgets.cxx        \
112
                  input/fread.cxx         input/fscanf.cxx       \
113
                  input/gets.cxx          input/scanf.cxx        \
114
                  input/vfscanf.cxx                              \
115
                                                                 \
116
                  output/fnprintf.cxx     output/fprintf.cxx     \
117
                  output/fputc.cxx        output/fputs.cxx       \
118
                  output/fwrite.cxx       output/printf.cxx      \
119
                  output/vfnprintf.cxx
120
 
121
# ====================================================================
122
 
123
    cdl_option CYGIMP_LIBC_STDIO_INLINES {
124
        display       "Inline versions of  functions"
125
        default_value 1
126
        description   "
127
            This option chooses whether some of the
128
            particularly simple functions from
129
             are available as inline
130
            functions. This may improve performance, and as
131
            the functions are small, may even improve code
132
            size."
133
    }
134
 
135
    cdl_option FOPEN_MAX {
136
        display       "Permitted number of open files"
137
        flavor        data
138
        legal_values  3 to 0x7fffffff
139
        default_value 8
140
        description   "
141
            This option controls the guaranteed minimum
142
            number of simultaneously open files. The ISO
143
            C standard requires it to be defined (para
144
            7.9.1), and if strictly compliant, it must be
145
            at least 8 (para 7.9.3). In practice it can be
146
            as low as 3 - for stdin, stdout and stderr."
147
    }
148
 
149
    cdl_option FILENAME_MAX {
150
        display       "Maximum length of filename"
151
        flavor        data
152
        legal_values  1 to 0x7fffffff
153
        default_value 16
154
        description   "
155
            This option defines the maximum allowed size of
156
            a filename in characters. The ISO C standard
157
            requires it to be defined (para 7.9.1)."
158
    }
159
 
160
    cdl_option L_tmpnam {
161
        display       "Maximum length of filenames for temporary files"
162
        flavor        data
163
        legal_values  4 to 0x7fffffff
164
        default_value 16
165
        description   "
166
            This option defines the maximum allowed size of
167
            filenames for temporary files as generated by
168
            tmpnam(). It is measured in characters, and the
169
            ISO C standard requires it to be defined (para
170
            7.9.1)."
171
    }
172
 
173
    cdl_option TMP_MAX {
174
        display       "Unique file names generated by tmpnam()"
175
        flavor        data
176
        legal_values  1 to 0x7fffffff
177
        default_value 25
178
        description   "
179
            This option defines the minimum number of
180
            unique file names generated by tmpnam(). The
181
            ISO C standard requires it to be defined (para
182
            7.9.1) and for ISO compliance it should be at least
183
            25. Note that TMP_MAX names may not be generated
184
            if L_tmpnam is too small."
185
    }
186
 
187
    cdl_component CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO {
188
        display       "Buffered I/O"
189
        flavor        bool
190
        default_value 1
191
        description   "
192
            This option controls whether input/output
193
            through the  functions is buffered.
194
            This may save some memory per file. It
195
            is equivalent to putting every file into
196
            non-buffered mode (_IONBF) through setvbuf(),
197
            except now it can never be altered back to
198
            buffered mode. Disabling buffering is strictly
199
            non-compliant with the ISO C standard."
200
 
201
        cdl_option CYGNUM_LIBC_STDIO_BUFSIZE {
202
            display        "Default buffer size"
203
            flavor         data
204
            legal_values   1 to 0x7fffffff
205
            default_value  256
206
            description    "
207
                This option defines the default size of buffer
208
                used with calls to setbuf(), and is the default
209
                size for buffered streams that have not had
210
                either setbuf() or setvbuf() invoked on them.
211
                It is exactly equivalent to the standard
212
                constant BUFSIZ, except that it is 0 if
213
                CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO is disabled.
214
                The ISO C standard requires this to be defined
215
                (para 7.9.1), and says it must be at least 256
216
                (para 7.9.2)."
217
        }
218
 
219
        cdl_option CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF {
220
            display       "setbuf()/setvbuf() allows dynamic setting"
221
            default_value 1
222
            description   "
223
                This option controls whether I/O buffers are
224
                implemented dynamically within the stdio
225
                implementation. Otherwise they will be static,
226
                and cannot be changed by setbuf()/setvbuf(). If
227
                they are static (i.e. this option is disabled),
228
                any attempt to use an arbitrary buffer size, or
229
                to pass a user-supplied buffer to setbuf() or
230
                setvbuf() will fail - the buffer is implemented
231
                internally as a static array taking the size
232
                of the configuration option BUFSIZ. The only
233
                exception is if a user buffer is not supplied,
234
                and the buffer size requested is less than
235
                BUFSIZ. In this case, the buffer will
236
                be configured to only use that amount of
237
                buffering. However the unused memory left over
238
                will NOT be freed. If this option is enabled,
239
                then setvbuf() can be used to assign a user supplied
240
                buffer to the stream.
241
                Either setting can be considered to
242
                be compliant with the ISO C standard."
243
        }
244
 
245
        cdl_option CYGSEM_LIBC_STDIO_SETVBUF_MALLOC {
246
            display       "setbuf()/setvbuf() uses malloc()"
247
            requires      CYGINT_ISO_MALLOC
248
            requires      CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
249
            default_value { 0 != CYGINT_ISO_MALLOC }
250
            description   "
251
                This option controls whether buffers set by setbuf() and
252
                setvbuf() may be allocated using malloc()."
253
        }
254
 
255
    }
256
    # Define BUFSIZ with same value as ..._BUFSIZE or 0
257
    cdl_option BUFSIZ {
258
        display       "Default buffer size (BUFSIZ)"
259
        flavor        data
260
        calculated    CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO \
261
                       ? "CYGNUM_LIBC_STDIO_BUFSIZE" : 0
262
    }
263
 
264
    cdl_option CYGFUN_LIBC_STDIO_ungetc {
265
        display       "Support for ungetc()"
266
        default_value   1
267
        description   "
268
            This option controls whether ungetc() is
269
            supported. If not, then some space can be
270
            saved, and speed is improved. Note that you
271
            MUST have this defined if you want to use the
272
            scanf() family of functions."
273
    }
274
 
275
    cdl_component CYGPKG_LIBC_STDIO_OPEN {
276
        display       "Dynamic opening/closing of files"
277
        requires      CYGINT_ISO_MALLOC
278
        default_value { 0 != CYGINT_ISO_MALLOC }
279
        compile       common/fopen.cxx common/fclose.cxx
280
        description   "
281
            fopen() and fclose() use dynamic memory
282
            allocation routines to allocate memory for
283
            new FILE structure pointers. If a malloc
284
            implementation is available, this option
285
            may be enabled to use
286
            fopen() and fclose(). If disabled, only the
287
            default console streams - stdin, stdout and
288
            stderr - will be available."
289
 
290
        cdl_option CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS {
291
            display       "POSIX fdopen/fileno functions"
292
            active_if     CYGPKG_LIBC_STDIO_FILEIO
293
            implements    CYGINT_ISO_STDIO_POSIX_FDFUNCS
294
            calculated    1
295
            description   "This identifies to the rest of the system
296
                           whether the POSIX fdopen() and
297
                           fileno() functions are implemented."
298
        }
299
    }
300
 
301
    cdl_option CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE {
302
        display       "Default console device"
303
        flavor        data
304
        default_value { CYGDAT_IO_SERIAL_TTY_CONSOLE ? CYGDAT_IO_SERIAL_TTY_CONSOLE : "\"/dev/null\"" }
305
        description   "
306
            This option allows you to choose the
307
            default console device. In the current
308
            implementation, all these devices begin
309
            with the prefix /dev/ and are followed by
310
            the name of a device. The name of the device
311
            depends on the device drivers you have
312
            configured in your system. For example,
313
            /dev/ttydiag could be the HAL diagnostic output
314
            pseudo-device, or /dev/tty0 could be your
315
            first serial driver, depending on your
316
            configuration."
317
    }
318
 
319
    cdl_component CYGPKG_LIBC_STDIO_FLOATING_POINT {
320
        display       "Floating point support"
321
        flavor        none
322
        description   "
323
            This component allows floating point support
324
            to be enabled in certain standard I/O
325
            functions."
326
 
327
        cdl_option CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT {
328
            display       "printf() family"
329
            requires      CYGPKG_LIBM
330
            default_value { 0 != CYGPKG_LIBM }
331
            description   "
332
                This option enables the use of floating point
333
                number output in the printf() family (i.e.
334
                printf(), sprintf(), vprintf(), etc.) of
335
                functions. A substantial amount of code space
336
                can be saved if this option is disabled. If it
337
                is disabled then floating point specifiers
338
                (%e, %f, %g) are ignored, and nothing is
339
                output."
340
        }
341
 
342
        cdl_option CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT {
343
            display       "scanf() family"
344
            requires      CYGPKG_LIBM
345
            requires      CYGINT_ISO_STDLIB_STRCONV_FLOAT
346
            default_value { 0 != CYGPKG_LIBM &&
347
 
348
            description   "
349
                This option enables the use of floating point
350
                number conversion in the scanf() family (i.e.
351
                scanf(), sscanf(), vscanf(), etc.) of
352
                functions. A substantial amount of code space
353
                can be saved if this option is disabled. If it
354
                is disabled then floating point specifiers
355
                (%e, %f, %g) are ignored, and nothing is
356
                converted."
357
        }
358
    }
359
 
360
    cdl_option CYGFUN_LIBC_STDIO_LONGLONG {
361
        display       "Long long support"
362
        requires      CYGFUN_LIBC_STDLIB_CONV_LONGLONG
363
        default_value 1
364
        description   "
365
                This option allows various functions in the C Standard I/O
366
                library to support the 'long long' datatype. Doing so
367
                will come with a noticeable code size penalty however."
368
    }
369
 
370
    cdl_option CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS {
371
        display       "Thread safe I/O streams"
372
        doc           ref/libc-thread-safety.html
373
        active_if     CYGPKG_KERNEL
374
        default_value 1
375
        description   "
376
            This option controls whether standard I/O streams
377
            are thread-safe. Having this option set allows
378
            the streams to be locked when accessed by
379
            multiple threads simultaneously."
380
    }
381
 
382
    cdl_option CYGIMP_LIBC_STDIO_C99_SNPRINTF {
383
        display       "C99 compliant snprintf() family"
384
        default_value 0
385
        description   "
386
                This option allows C99 compliant implementation of
387
                snprintf() family (i.e. snprintf(), vsnprintf())
388
                of functions. C99 compliant snprintf() functions
389
                return the number of characters that would have been written
390
                to a sufficiently sized buffer (excluding the '\\0').
391
                If this option is disabled, the functions simply return
392
                the number of bytes that have been written to the buffer."
393
    }
394
 
395
 
396
# ====================================================================
397
 
398
    cdl_option CYGPKG_LIBC_STDIO_FILEIO {
399
        display "Enable use of FILEIO package for IO operations."
400
        active_if CYGPKG_IO_FILEIO
401
        requires CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO
402
        requires CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF
403
        calculated 1
404
        description "
405
                This CDL exists to control how the standard I/O functions
406
                interface to the underlying I/O system. Either using the
407
                File I/O package, or the generic I/O package which is used
408
                by fewer devices."
409
    }
410
}
411
 
412
# ====================================================================
413
 
414
    cdl_component CYGPKG_LIBC_STDIO_OPTIONS {
415
        display "C library stdio functions build options"
416
        flavor  none
417
        no_define
418
        description   "
419
            Package specific build options including control over
420
            compiler flags used only in building this package,
421
            and details of which tests are built."
422
 
423
 
424
        cdl_option CYGPKG_LIBC_STDIO_CFLAGS_ADD {
425
            display "Additional compiler flags"
426
            flavor  data
427
            no_define
428
            default_value { "" }
429
            description   "
430
                This option modifies the set of compiler flags for
431
                building the C library. These flags are used in addition
432
                to the set of global flags."
433
        }
434
 
435
        cdl_option CYGPKG_LIBC_STDIO_CFLAGS_REMOVE {
436
            display "Suppressed compiler flags"
437
            flavor  data
438
            no_define
439
            default_value { "" }
440
            description   "
441
                This option modifies the set of compiler flags for
442
                building the C library. These flags are removed from
443
                the set of global flags if present."
444
        }
445
 
446
        cdl_option CYGPKG_LIBC_STDIO_TESTS {
447
            display "C library stdio function tests"
448
            flavor  data
449
            no_define
450
            calculated {
451
                "tests/sprintf1 tests/sprintf2 tests/snprintf tests/sscanf tests/stdiooutput "
452
                . ((CYGPKG_IO_FILEIO && CYGPKG_FS_RAM) ? "tests/fileio " : "")
453
            }
454
            description   "
455
                This option specifies the set of tests for the C library
456
                stdio functions."
457
        }
458
    }
459
 
460
# ====================================================================
461
# EOF stdio.cdl

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.