ISO-compliant C library input/output
characteristics
The generic ARM C library has the following input/output characteristics:
The last line of a text stream does
not require a terminating newline character.
Space characters written out to a text stream immediately
before a newline character do appear when read back in.
No NUL characters are appended
to a binary output stream.
The file position indicator of an append mode stream
is initially placed at the end of the file.
A write to a text stream causes the associated file
to be truncated beyond the point where the write occurred if this
is the behavior of the device category of the file.
If semihosting is used, the maximum number of open
files is limited by the available target memory.
A zero-length file exists, that is, where no characters
have been written by an output stream.
A file can be opened many times for reading, but
only once for writing or updating. A file cannot simultaneously
be open for reading on one stream, and open for writing or updating
on another.
Local time zones and Daylight Saving Time are not
implemented. The values returned indicate that the information is
not available. For example, the gmtime() function
always returns NULL.
The status returned by exit() is
the same value that was passed to it. For definitions of EXIT_SUCCESS and EXIT_FAILURE,
see the header file stdlib.h. Semihosting,
however, does not pass the status back to the execution environment.
The error messages returned by the strerror() function
are identical to those given by the perror() function.
If the size of area requested is zero, calloc() and realloc() return NULL.
If the size of area requested is zero, malloc() returns
a pointer to a zero-size block.
abort() closes all open files
and deletes all temporary files.
fprintf() prints %p arguments
in lowercase hexadecimal format as if a precision of 8 had been
specified. If the variant form (%#p) is used,
the number is preceded by the character @.
fscanf() treats %p arguments
exactly the same as %x arguments.
fscanf() always treats the
character "-" in a %...[...] argument as a literal
character.
ftell(), fsetpos() and fgetpos() set errno to
the value of EDOM on failure.
perror() generates the messages
shown in Table 12.
Table 12. perror() messages
Error
Message
0
No error (errno = 0)
EDOM
EDOM - function argument out
of range
ERANGE
ERANGE - function result not
representable
ESIGNUM
ESIGNUM - illegal signal number
Others
Unknown error
The following characteristics are unspecified in the ARM C
library. They must be specified in an ISO-compliant implementation:
the validity of a filename
whether remove() can remove
an open file
the effect of calling the rename() function
when the new name already exists
the effect of calling getenv() (the
default is to return NULL, no value available)
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.