📄 libc.h
字号:
} cdl_option CYGIMP_LIBC_RAND_SIMPLEST { display "Simplest implementation" description "This provides a very simple implementation of rand() that does not perform well with randomness in the lower significant bits. However it is exceptionally fast. It uses the sample algorithm from the ISO C standard itself." type radio parent CYGPKG_LIBC_RAND } cdl_option CYGIMP_LIBC_RAND_SIMPLE1 { display "Simple implementation #1" description "This provides a very simple implementation of rand() based on the simplest implementation above. However it does try to work around the lack of randomness in the lower significant bits, at the expense of a little speed." type radio parent CYGPKG_LIBC_RAND } cdl_option CYGIMP_LIBC_RAND_KNUTH1 { display "Knuth implementation #1" description "This implements a slightly more complex algorithm published in Donald E. Knuth's Art of Computer Programming Vol.2 section 3.6 (p.185 in the 3rd ed.). This produces better random numbers than the simplest approach but is slower." type radio parent CYGPKG_LIBC_RAND } cdl_component CYGPKG_LIBC_MALLOC { display "Support for dynamic memory allocation" description "This enables support for dynamic memory allocation as supplied by the functions malloc(), free(), calloc() and realloc(). As these functions are often used, but can have quite an overhead, disabling them here can ensure they cannot even be used accidentally when static allocation is preferred." type boolean parent CYGPKG_LIBC_STDLIB requires CYGPKG_KERNEL } cdl_option CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE { display "Size of the dynamic memory pool in bytes" description "At this stage, dynamic memory allocation by malloc() and calloc() must be from a fixed-size, contiguous memory pool (note here that it is the pool that is of a fixed size, but malloc() is still able to allocate variable sized chunks of memory from it). This option is the size of that pool, in bytes. Note that not all of this is available for programs to use - some is needed for internal information about memory regions, and some may be lost to ensure that memory allocation only returns memory aligned on word (or double word) boundaries - a very common architecture constraint." type count legal_values 32 to 0x7fffffff parent CYGPKG_LIBC_MALLOC } cdl_option CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE { display "Support for C++ delete operator" description "C++ new and delete operators can call the C library's malloc() and free() implicitly. If this is what is required, enable this option. However, if enabled, the dynamic memory allocation code is always linked in to the application, even if it is not explicitly called and new/delete are not used. This increases code and data size needlessly." type bool parent CYGPKG_LIBC_MALLOC } cdl_option CYGFUN_LIBC_strtod { display "Provides strtod() and atof()" description "This option allows use of the utility function strtod() (and consequently atof()) to convert from string to double precision floating point numbers. Disabling this option removes the dependency on the math library package." type boolean parent CYGPKG_LIBC_STDLIB requires CYGPKG_LIBM } cdl_option CYGNUM_LIBC_BSEARCH_TRACE_LEVEL { display "bsearch() tracing level" description "Trace verbosity level for debugging the <stdlib.h> binary search function bsearch(). Increase this value to get additional trace output." type count legal_values 0 to 1 parent CYGPKG_LIBC_STDLIB } cdl_option CYGNUM_LIBC_QSORT_TRACE_LEVEL { display "qsort() tracing level" description "Trace verbosity level for debugging the <stdlib.h> quicksort function qsort(). Increase this value to get additional trace output." type count legal_values 0 to 1 parent CYGPKG_LIBC_STDLIB } }}CFG_DATA*/#define CYGIMP_LIBC_STDLIB_INLINES#undef CYGSEM_LIBC_PER_THREAD_RAND#define CYGNUM_LIBC_RAND_SEED 1#define CYGNUM_LIBC_RAND_TRACE_LEVEL 0#undef CYGIMP_LIBC_RAND_SIMPLEST#define CYGIMP_LIBC_RAND_SIMPLE1#undef CYGIMP_LIBC_RAND_KNUTH1#define CYGPKG_LIBC_MALLOC#ifdef CYGPKG_LIBC_MALLOC#undef CYGIMP_LIBC_MALLOC_CXX_DELETE_CALLS_FREE#define CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE 16384#endif // ifdef CYGPKG_LIBC_MALLOC#define CYGFUN_LIBC_strtod#define CYGNUM_LIBC_BSEARCH_TRACE_LEVEL 0#define CYGNUM_LIBC_QSORT_TRACE_LEVEL 0#ifdef CYGFUN_LIBC_strtod# ifndef CYGPKG_LIBM# error You must enable the Math library package to use strtod() or atof()# endif#endif//========================================================================// STDIO CONFIGURATION OPTIONS/* {{CFG_DATA cdl_component CYGPKG_LIBC_STDIO { display "Standard Input/Output functions" description "This enables support for standard I/O functions from <stdio.h>." type boolean parent CYGPKG_LIBC requires CYGPKG_IO requires CYGPKG_IO_SERIAL_HALDIAG } cdl_option CYGIMP_LIBC_STDIO_INLINES { display "Inline versions of <stdio.h> functions" description "This option chooses whether some of the particularly simple functions from <stdio.h> are available as inline functions. This may improve performance, and as the functions are small, may even improve code size." type boolean parent CYGPKG_LIBC_STDIO } cdl_option FOPEN_MAX { display "Permitted number of open files" description "This option controls the guaranteed minimum number of simultaneously open files. The ISO C standard requires it to be defined (para 7.9.1), and if strictly compliant, it must be at least 8 (para 7.9.3). In practice it can be as low as 3 - for stdin, stdout and stderr." type count legal_values 3 to 0x7fffffff parent CYGPKG_LIBC_STDIO } cdl_option FILENAME_MAX { display "Maximum length of filename" description "This option defines the maximum allowed size of a filename in characters. The ISO C standard requires it to be defined (para 7.9.1)." type count legal_values 1 to 0x7fffffff parent CYGPKG_LIBC_STDIO } cdl_option L_tmpnam { display "Maximum length of filenames for temporary files" description "This option defines the maximum allowed size of filenames for temporary files as generated by tmpnam(). It is measured in characters, and the ISO C standard requires it to be defined (para 7.9.1)." type count legal_values 1 to 0x7fffffff parent CYGPKG_LIBC_STDIO } cdl_option TMP_MAX { display "Unique file names generated by tmpnam()" description "This option defines the minimum number of unique file names generated by tmpnam(). The ISO C standard requires it to be defined (para 7.9.1)." type count legal_values 0 to 0x7fffffff parent CYGPKG_LIBC_STDIO } cdl_component CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO { display "Buffered I/O" description "This option controls whether input/output through the <stdio.h> functions is buffered. This may save some memory per file. It is equivalent to putting every file into non-buffered mode (_IONBF) through setvbuf(), except now it can never be altered back to buffered mode. Disabling buffering is strictly non-compliant with the ISO C standard." type boolean parent CYGPKG_LIBC_STDIO } cdl_option CYGNUM_LIBC_STDIO_BUFSIZE { display "Default buffer size" description "This option defines the default size of buffer used with calls to setbuf(), and is the default size for buffered streams that have not had either setbuf() or setvbuf() invoked on them. It is exactly equivalent to the standard constant BUFSIZ, except that it is 0 if CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO is disabled. The ISO C standard requires this to be defined (para 7.9.1), and says it must be at least 256 (para 7.9.2)." type count legal_values 1 to 0x7fffffff parent CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO } cdl_option CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF { display "setbuf()/setvbuf() uses malloc()" description "This option controls whether I/O buffers are implemented dynamically within the stdio implementation. Otherwise they will be static, and cannot be changed by setbuf()/setvbuf(). If they are static (i.e. this option is disabled), any attempt to use an arbitrary buffer size, or to pass a user-supplied buffer to setbuf() or setvbuf() will fail - the buffer is implemented internally as a static array of taking the size of the configuration option BUFSIZ. The only exception is if a user buffer is not supplied, and the buffer size requested is less than BUFSIZ. In this case, the buffer will be configured to only use that amount of buffering. However the unused memory left over will NOT be freed. If this option is enabled, then CYGPKG_LIBC_MALLOC must also be enabled. Either setting can be considered to be compliant with the ISO C standard." type boolean parent CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO requires CYGPKG_LIBC_MALLOC } cdl_option CYGFUN_LIBC_STDIO_ungetc { display "Support for ungetc()" description "This option controls whether ungetc() is supported. If not, then some space can be saved, and speed is improved. Note that you MUST have this defined if you want to use the scanf() family of functions." type boolean parent CYGPKG_LIBC_STDIO } cdl_option CYGPKG_LIBC_STDIO_OPEN { display "Dynamic opening/closing of files" description "fopen() and fclose() use dynamic memory
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -