📄 libc.h
字号:
allocation routines to allocate memory for new FILE structure pointers. This option, along with CYGPKG_LIBC_MALLOC, should be enabled to use fopen() and fclose(). If disabled, only the default console streams - stdin, stdout and stderr - will be available." type boolean parent CYGPKG_LIBC_STDIO requires CYGPKG_LIBC_MALLOC } cdl_option CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE { display "Default console device" description "This option allows you to choose the default console device. In the current implementation, all these devices begin with the prefix /dev/ and are followed by the name of a device. The name of the device depends on the device drivers you have configured in your system. For example, /dev/haldiag could be the HAL diagnostic output pseudo-device, or /dev/tty0 could be your first serial driver, depending on your configuration." type string parent CYGPKG_LIBC_STDIO } cdl_component CYGPKG_LIBC_STDIO_FLOATING_POINT { display "Floating point support" description "This component allows floating point support to be enabled in certain standard I/O functions." type dummy parent CYGPKG_LIBC_STDIO } cdl_option CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT { display "printf() family" description "This option enables the use of floating point number output in the printf() family (i.e. printf(), sprintf(), vprintf(), etc.) of functions. A substantial amount of code space can be saved if this option is disabled. If it is disabled then floating point specifiers (%e, %f, %g) are ignored, and nothing is output." type boolean parent CYGPKG_LIBC_STDIO_FLOATING_POINT requires CYGPKG_LIBM } cdl_option CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT { display "scanf() family" description "This option enables the use of floating point number conversion in the scanf() family (i.e. scanf(), sscanf(), vscanf(), etc.) of functions. A substantial amount of code space can be saved if this option is disabled. If it is disabled then floating point specifiers (%e, %f, %g) are ignored, and nothing is converted." type boolean parent CYGPKG_LIBC_STDIO_FLOATING_POINT requires CYGPKG_LIBM requires CYGFUN_LIBC_strtod } cdl_option CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS { display "Thread safe I/O streams" description "This option controls whether standard I/O streams are thread-safe. Having this option set allows the streams to be locked when accessed by multiple threads simultaneously." doc ref/ecos-ref/c-and-math-library-overview-thread-safety.html type boolean parent CYGPKG_LIBC_STDIO requires CYGPKG_KERNEL } }}CFG_DATA*/#define CYGPKG_LIBC_STDIO#ifdef CYGPKG_LIBC_STDIO#ifndef CYGPKG_IO# error You must have generic device driver support enabled for C library \ standard I/O#endif#define CYGIMP_LIBC_STDIO_INLINES#define FOPEN_MAX 8#define FILENAME_MAX 16#define L_tmpnam 16#define TMP_MAX 0#define CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO#define CYGNUM_LIBC_STDIO_BUFSIZE 256#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO# define BUFSIZ CYGNUM_LIBC_STDIO_BUFSIZE#else# define BUFSIZ 0#endif#undef CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF#ifdef CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF# ifndef CYGPKG_LIBC_MALLOC# error You must have malloc() support if you want dynamic setvbuf \ support in the C library# endif#endif#define CYGFUN_LIBC_STDIO_ungetc#define CYGPKG_LIBC_STDIO_OPEN#ifdef CYGPKG_LIBC_STDIO_OPEN# ifndef CYGPKG_LIBC_MALLOC# error You must have malloc() support if you want to use fopen()# endif#endif// We define a default console so that the console is defined// statically, to prevent the requirement of dynamic memory allocation, and// since there is generally only one relevant console which exists for the// lifetime of the system. See the device driver documentation and examine// your configuration to find out which device names are available. The// device names should be prefixed with "/dev/".//// So what is the name of the device that is the default console device#define CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE "/dev/haldiag"#define CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT#ifdef CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT# ifndef CYGPKG_LIBM# error You must enable the Math library to use floating point in the \ *printf() functions# endif#endif#define CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT#ifdef CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT# ifndef CYGFUN_LIBC_strtod // libm is implicit with this# error You must enable the use of strtod and the math library to use \ floating point in the *scanf() functions# endif#endif#endif // ifdef CYGPKG_LIBC_STDIO#define CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS//========================================================================// INTERNATIONALIZATION AND LOCALIZATION OPTIONS/* {{CFG_DATA cdl_option CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE { display "Size of locale name strings" description "This option controls the maximum size of locale names and is used, among other things to instantiate a static string used as a return value from the setlocale() function. When requesting the current locale settings with LC_ALL, a string must be constructed to contain this data, rather than just returning a constant string. This string data is stored in the static string. This depends on the length of locale names, hence this option. If just the C locale is present, this option can be set as low as 2." type count legal_values 2 to 0x7fffffff parent CYGPKG_LIBC } }}CFG_DATA*/#define CYGNUM_LIBC_MAX_LOCALE_NAME_SIZE 16//========================================================================// SIGNAL CONFIGURATION OPTIONS/* {{CFG_DATA cdl_component CYGPKG_LIBC_SIGNALS { display "Signals" description "This component controls signal functionality, as implemented in ISO C chapter 7.7 with the signal() and raise() functions. As well as allowing a program to send itself signals, it is also possible to cause hardware exceptions to be signalled to the program in a similar way." type boolean parent CYGPKG_LIBC } cdl_option CYGSEM_LIBC_SIGNALS_THREAD_SAFE { display "Thread safe signals" description "Because signal handlers are global, and not thread-specific (as mandated by POSIX 1003.1) it is possible for multiple threads to clash and corrupt data if setting the same signal handler at the same time. With this option enabled, a kernel mutex will be used to protect the shared data." type boolean requires CYGPKG_KERNEL parent CYGPKG_LIBC_SIGNALS } cdl_component CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS { display "Hardware exceptions cause signals" description "This causes hardware exceptions like arithmetic exceptions (e.g. divide by zero) or bad memory accesses to be passed through as signals. It is thus possible for a program to handle these exceptions in a generic way using the appropriate signal handlers. The details of exactly which exceptions are passed through under what circumstances depend on the underlying HAL implementation. Consequently it must be remembered that signal handlers cannot be guaranteed to be invoked in the expected circumstances if you do not know about the underlying HAL implementation - it is possible that the architecture is unable to detect that exception." type boolean requires CYGSEM_KERNEL_EXCEPTIONS_GLOBAL requires CYGSEM_KERNEL_EXCEPTIONS_DECODE parent CYGPKG_LIBC_SIGNALS } cdl_option CYGSEM_LIBC_SIGNALS_CHAIN_HWEXCEPTIONS { display "Chain old exception handlers" description "When hardware exceptions are generated, it is possible to chain into the old kernel exception handler before calling any registered signal handler. If this is not required, disable this option and only the signal handler will be called when this exception occurs. Disabling this option will also save some space and code usage." type boolean requires !CYGPKG_HAL_I386_LINUX parent CYGSEM_LIBC_SIGNALS_HWEXCEPTIONS } cdl_component CYGPKG_LIBC_SIGNALS_INLINE { display "Inline versions of functions" description "Some functions can be made inline instead of being function calls. These can be set here." type dummy parent CYGPKG_LIBC_SIGNALS } cdl_option CYGIMP_LIBC_SIGNALS_RAISE_INLINE { display "raise()" description "Enabling this option makes raise() an inline function." type boolean parent CYGPKG_LIBC_SIGNALS_INLINE } cdl_option CYGIMP_LIBC_SIGNALS_SIGNAL_INLINE { display "signal()" description "Enabling this option makes signal() an inline function." type boolean parent CYGPKG_LIBC_SIGNALS_INLINE } cdl_component CYGPKG_LIBC_SIGNALS_ERROR_HANDLING { display "Error handling" description "You may or may not want errno to be set by certain functions. Not using errno could save both space, code, and avoid worrying about interactions between multiple threads when setting it." type dummy
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -