Component: ISO C startup/termination

Macro name

CYGPKG_LIBC_STARTUP

Type

Dummy

Description

This component manages the control of the environment (in the general sense) that the C library provides for use for full ISO C compatibility, including a main() entry point supplied with arguments and an environment (as retrievable by the getenv() function). It also includes at the other end of things, what happens when main() returns or exit() is called.

Option: Arguments to main()

Macro name

CYGDAT_LIBC_ARGUMENTS

Type

String

Description

This option allows the setting of the arguments to the main function. This only has any effect when cyg_iso_c_start() is used to start the ISO C compatibility. This will automatically invoke main() in an ISO C compatible fashion. This option is in fact used as argv, and so is an n-tuple of string constants. The final entry must be NULL. Conventionally if argv[0] is supplied, it is used to inform the program of its name.

Option: main()'s thread stack size

Macro name

CYGNUM_LIBC_MAIN_STACK_SIZE

Type

Count

Description

With an eCos kernel, when the cyg_iso_c_start() function is used to invoke the user-supplied main() function in an ISO C compatible fashion, a separate thread is created to call main(). This option controls the size of that thread's stack, which is allocated in the BSS. It must be a multiple of 8.

Option: Number of functions atexit() supports

Macro name

CYGNUM_LIBC_ATEXIT_HANDLERS

Type

Count

Description

This option sets the number of functions that atexit() has room for. In other words, the number of separate atexit() calls that can be made before calling exit() or returning from main() ( in an environment controlled by cyg_iso_c_start() ). For strict compliance with the ISO C standard this should be at least 32.

Option: _exit() stops all threads

Macro name

CYGSEM_LIBC_EXIT_STOPS_SYSTEM

Type

Boolean

Description

If this option is enabled then _exit(), which is called from exit() which itself is called on return from main(), stops the eCos scheduler. For strict POSIX 1003.1 compatibility this would be the normal behaviour. To allow the thread to simply exit, without affecting other threads, simply disable this option. If there is no eCos scheduler, then _exit() simply loops irrespective of the setting of this option.

Component: Provide a system environment

Macro name

CYGPKG_LIBC_ENVIRONMENT

Type

Boolean

Description

This option allows use of the getenv() function and the global environment pointer char **environ defined by POSIX 1003.1. Disabling this saves a small amount of space.

Option: Default environment

Macro name

CYGDAT_LIBC_DEFAULT_ENVIRONMENT

Type

String

Description

This option allows the setting of the default contents of the environment. This is in fact the contents of the global environment pointer char **environ defined by POSIX 1003.1. Strings must be of the form NAME=VALUE, and the final entry must be NULL.