eCosTM Reference Manual
Prev |  | Next

# Chapter 14. C and math library overview

eCos provides compatibility with the ISO 9899:1990 specification for the standard C library, which is essentially the same as the better-known ANSI C3.159-1989 specification (C-89).

There are three aspects of this compatibility supplied by eCos. First there is a C library which implements the functions defined by the ISO standard, except for the mathematical functions. This is provided by the eCos C library package.

Then eCos provides a math library, which implements the mathematical functions from the ISO C library. This distinction between C and math libraries is frequently drawn — most standard C library implementations provide separate linkable files for the two, and the math library contains all the functions from the `math.h` header file.

There is a third element to the ISO C library, which is the environment in which applications run when they use the standard C library. This environment is set up by the C library startup procedure (see the section called C library startup) and it provides (among other things) a `main()` entry point function, an `exit()` function that does the cleanup required by the standard (including handlers registered using the `atexit()` function), and an environment that can be read with `getenv()`.

The description in this manual focuses on the eCos-specific aspects of the C library (mostly related to eCos"s configurability) as well as mentioning the omissions from the standard in this release. We do not attempt to define the semantics of each function, since that information can be found in the ISO, ANSI, POSIX and IEEE standards, and the many good books that have been written about the standard C library, that cover usage of these functions in a more general and useful way.

copyright notice. The eCos C library includes software developed by the University of California at Berkeley and its contributors. The University of California at Berkeley licensing terms request that we place this notice in the product. Full details can be found in the affected source files.

# Omitted functionality

The ISO C functionality that is currently omitted in the C library can be grouped by the header files in which they are declared:

## stdio.h

`remove()` | `ftell()`
`rename()` | `rewind()`
`tmpfile()` | `fgetpos()`
`tmpnam()` | `fsetpos()`
`fseek()` |

Most of these functions are omitted because they only apply to disk-based file systems. These will be supported in a future version of eCos.

## stdlib.h

`mblen()` | `mbstowcs()`
`mbtowc()` | `wcstombs()`
`wctomb()` | `MB_CUR_MAX`

All of these functions are related to multibyte and wide character support.

Prev | Home | Next
The ISO Standard C and Math Libraries | Up | Included non-ISO functions