Component: Standard Input/Output functions

Macro name

CYGPKG_LIBC_STDIO

Type

Boolean

Description

This enables support for standard I/O functions from <stdio.h>.

Option: Inline versions of <stdio.h> functions

Macro name

CYGIMP_LIBC_STDIO_INLINES

Type

Boolean

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.

Option: Permitted number of open files

Macro name

FOPEN_MAX

Type

Count

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.

Option: Maximum length of filename

Macro name

FILENAME_MAX

Type

Count

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).

Option: Maximum length of filenames for temporary files

Macro name

L_tmpnam

Type

Count

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).

Option: Unique file names generated by tmpnam()

Macro name

TMP_MAX

Type

Count

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).

Component: Buffered I/O

Macro name

CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO

Type

Boolean

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.

Option: Default buffer size

Macro name

CYGNUM_LIBC_STDIO_BUFSIZE

Type

Count

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 BUFSIZE, 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).

Option: setbuf()/setvbuf() uses malloc()

Macro name

CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF

Type

Boolean

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 BUFSIZE. The only exception is if a user buffer is not supplied, and the buffer size requested is less than BUFSIZE. 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.

Option: Support for ungetc()

Macro name

CYGFUN_LIBC_STDIO_ungetc

Type

Boolean

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.

Option: Dynamic opening/closing of files

Macro name

CYGPKG_LIBC_STDIO_OPEN

Type

Boolean

Description

fopen() and fclose() use dynamic memory 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.

Option: Default console device

Macro name

CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE

Type

String

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.

Component: Floating point support

Macro name

CYGPKG_LIBC_STDIO_FLOATING_POINT

Type

Dummy

Description

This component allows floating point support to be enabled in certain standard I/O functions.

Option: printf() family

Macro name

CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT

Type

Boolean

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.

Option: scanf() family

Macro name

CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT

Type

Boolean

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.

Option: Thread safe I/O streams

Macro name

CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS

Type

Boolean

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.