libc man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

LIBC(3)				    NEWLIB			       LIBC(3)

NAME
	libc

SYNOPSIS
	The ANSI C library.

DESCRIPTION
	  This file documents the ANSI C library.

	  Copyright (C) 1992, 1993, 1994-2009 Red Hat, Inc.

	  `libc'  includes software developed by the University of California,
       Berkeley and its contributors.

	  libc includes software developed by Martin Jackson, Graham Haley and
       Steve Chamberlain of Tadpole Technology and released to Cygnus.

	  libc	uses  floating-point  conversion  software  developed at AT&T,
       which includes this copyright information:

	  The author of this software is David M. Gay.

	  Copyright (c) 1991 by AT&T.

	  Permission to use, copy, modify, and distribute  this	 software  for
       any  purpose  without  fee is hereby granted, provided that this entire
       notice is included in all copies of any software which is or includes a
       copy or modification of this software and in all copies of the support‐
       ing documentation for such software.

	  THIS SOFTWARE IS BEING PROVIDED "AS  IS",  WITHOUT  ANY  EXPRESS  OR
       IMPLIED	 WARRANTY.   IN	 PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES
       ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABIL‐
       ITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.

	  Permission is granted to make and distribute verbatim copies of this
       manual provided the copyright notice and	 this  permission  notice  are
       preserved on all copies.

	  Permission  is  granted  to copy and distribute modified versions of
       this manual under the conditions for verbatim copying, subject  to  the
       terms  of  the GNU General Public License, which includes the provision
       that the entire resulting derived work is distributed under  the	 terms
       of a permission notice identical to this one.

	  Permission  is  granted  to copy and distribute translations of this
       manual into another language, under the above conditions	 for  modified
       versions.

       The Red Hat newlib C Library ****************************

       * Menu:

       * Introduction::
       * Stdlib::
       * Ctype::
       * Stdio::

       * Stdio64::

       * Strings::
       * Wchar strings::

       * Signals::

       * Timefns::
       * Locale::
       * Reentrancy::

       * Misc::
       * Posix::
       * Syscalls::
       * Arglists::

       * Library Index::

       2	 Standard	  Utility	 Functions	  (`stdlib.h')
       *****************************************

       This chapter groups utility functions useful in a variety of  programs.
       The corresponding declarations are in the header file `stdlib.h'.

       * Menu:

       * _Exit::       End program execution without cleaning up
       * a64l::	       String to long long
       * abort::       Abnormal termination of a program
       * abs::	       Integer absolute value (magnitude)
       * assert::      Macro for Debugging Diagnostics
       * atexit::      Request execution of functions at program exit
       * atof::	       String to double or float
       * atoi::	       String to integer
       * atoll::       String to long long
       * bsearch::    Binary search
       * calloc::      Allocate space for arrays
       * div::	       Divide two integers
       * ecvtbuf::     Double or float to string of digits
       * ecvt::	       Double or float to string of digits (malloc result)
       * __env_lock::	   Lock environment list for getenv and setenv
       * gvcvt::       Format double or float as string
       * exit::	       End program execution
       * getenv::      Look up environment variable
       * labs::	       Long integer absolute value (magnitude)
       * ldiv::	       Divide two long integers
       * llabs::       Long long integer absolute value (magnitude)
       * lldiv::       Divide two long long integers
       * malloc::      Allocate and manage memory (malloc, realloc, free)
       * mallinfo::   Get information about allocated memory
       * __malloc_lock::   Lock memory pool for malloc and free
       * mbsrtowcs::  Convert a character string to a wide-character string
       * mbstowcs::   Minimal multibyte string to wide string converter
       * mblen:: Minimal multibyte length
       * mbtowc::      Minimal multibyte to wide character converter
       * on_exit::     Request execution of functions at program exit
       * qsort:: Array sort
       * rand::	       Pseudo-random numbers
       * rand48::      Uniformly distributed pseudo-random numbers
       * strtod::      String to double or float
       * strtol::      String to long
       * strtoll::     String to long long
       * strtoul::     String to unsigned long
       * strtoull::    String to unsigned long long
       * wcsrtombs::  Convert a wide-character string to a character string
       * wcstod::      Wide string to double or float
       * wcstol::      Wide string to long
       * wcstoll::     Wide string to long long
       * wcstoul::     Wide string to unsigned long
       * wcstoull::    Wide string to unsigned long long
       * system::      Execute command string
       * wcstombs::   Minimal wide string to multibyte string converter
       * wctomb::      Minimal wide character to multibyte converter

       3     Character	   Type	    Macros     and    Functions	   (`ctype.h')
       *************************************************

       This chapter groups macros (which are also available as subroutines) to
       classify	 characters into several categories (alphabetic, numeric, con‐
       trol characters, whitespace, and so on), or to perform simple character
       mappings.

	  The header file `ctype.h' defines the macros.

       * Menu:

       * isalnum::   Alphanumeric character predicate
       * isalpha::   Alphabetic character predicate
       * isascii::   ASCII character predicate
       * iscntrl::   Control character predicate
       * isdigit::   Decimal digit predicate
       * islower::   Lowercase character predicate
       * isprint::   Printable character predicates (isprint, isgraph)
       * ispunct::   Punctuation character predicate
       * isspace::   Whitespace character predicate
       * isupper::   Uppercase character predicate
       * isxdigit::  Hexadecimal digit predicate
       * toascii::   Force integers to ASCII range
       * tolower::   Translate characters to lowercase
       * toupper::   Translate characters to uppercase
       * iswalnum::  Alphanumeric wide character predicate
       * iswalpha::  Alphabetic wide character predicate
       * iswblank::  Blank wide character predicate
       * iswcntrl::  Control wide character predicate
       * iswdigit::  Decimal digit wide character predicate
       * iswgraph::  Graphic wide character predicate
       * iswlower::  Lowercase wide character predicate
       * iswprint::  Printable wide character predicate
       * iswpunct::  Punctuation wide character predicate
       * iswspace::  Whitespace wide character predicate
       * iswupper::  Uppercase wide character predicate
       * iswxdigit:: Hexadecimal digit wide character predicate
       * iswctype::  Extensible wide-character test
       * wctype::    Compute wide-character test type
       * towlower::  Translate wide characters to lowercase
       * towupper::  Translate wide characters to uppercase
       * towctrans:: Extensible wide-character translation
       * wctrans::   Compute wide-character translation type

       4 Input and Output (`stdio.h') ******************************

       This  chapter comprises functions to manage files or other input/output
       streams. Among these functions are  subroutines	to  generate  or  scan
       strings according to specifications from a format string.

	  The  underlying  facilities  for input and output depend on the host
       system, but these functions provide a uniform interface.

	  The corresponding declarations are in `stdio.h'.

	  The reentrant versions of these functions use macros

	    _stdin_r(REENT)
	    _stdout_r(REENT)
	    _stderr_r(REENT)

       instead of the globals `stdin', `stdout', and `stderr'.	 The  argument
       <[reent]> is a pointer to a reentrancy structure.

       * Menu:

       * clearerr::    Clear file or stream error indicator
       * diprintf::    Print to a file descriptor (integer only)
       * dprintf::     Print to a file descriptor
       * fclose::      Close a file
       * fcloseall::   Close all files
       * fdopen::      Turn an open file into a stream
       * feof::	       Test for end of file
       * ferror::      Test whether read/write error has occurred
       * fflush::      Flush buffered file output
       * fgetc::       Get a character from a file or stream
       * fgetpos::     Record position in a stream or file
       * fgets::       Get character string from a file or stream
       * fgetwc::      Get a wide character from a file or stream
       * fgetws::      Get a wide character string from a file or stream
       * fileno::      Get file descriptor associated with stream
       * fmemopen::    Open a stream around a fixed-length buffer
       * fopen::       Open a file
       * fopencookie:: Open a stream with custom callbacks
       * fpurge::      Discard all pending I/O on a stream
       * fputc::       Write a character on a stream or file
       * fputs::       Write a character string in a file or stream
       * fputwc::      Write a wide character to a file or stream
       * fputws::      Write a wide character string to a file or stream
       * fread::       Read array elements from a file
       * freopen::     Open a file using an existing file descriptor
       * fseek::       Set file position
       * fsetpos::     Restore position of a stream or file
       * ftell::       Return position in a stream or file
       * funopen::     Open a stream with custom callbacks
       * fwide:: Set and determine the orientation of a FILE stream
       * fwrite::      Write array elements from memory to a file or stream
       * getc::	       Get a character from a file or stream (macro)
       * getc_unlocked::   Get a character from a file or stream (macro)
       * getchar::     Get a character from standard input (macro)
       * getchar_unlocked::	Get a character from standard input (macro)
       * getdelim::    Get character string from a file or stream
       * getline::     Get character string from a file or stream
       * gets::	       Get character string from standard input (obsolete)
       * getw::	       Get a word (int) from a file or stream
       * getwchar::    Get a wide character from standard input
       * mktemp::      Generate unused file name
       * open_memstream::  Open a write stream around an arbitrary-length buf‐
       fer
       * perror::      Print an error message on standard error
       * putc::	       Write a character on a stream or file (macro)
       * putc_unlocked::   Write a character on a stream or file (macro)
       * putchar::     Write a character on standard output (macro)
       * putchar_unlocked::	Write a character on standard output (macro)
       * puts::	       Write a character string on standard output
       * putw::	       Write a word (int) to a file or stream
       * putwchar::    Write a wide character to standard output
       * remove::      Delete a file's name
       * rename::      Rename a file
       * rewind::      Reinitialize a file or stream
       * setbuf::      Specify full buffering for a file or stream
       * setbuffer::   Specify full buffering for a file or stream with size
       * setlinebuf::  Specify line buffering for a file or stream
       * setvbuf::     Specify buffering for a file or stream
       * siprintf::    Write formatted output (integer only)
       * siscanf::     Scan and format input (integer only)
       * sprintf::     Write formatted output
       * sscanf::      Scan and format input
       * swprintf::    Write formatted wide character output
       * swscanf::     Scan and format wide character input
       * tmpfile::     Create a temporary file
       * tmpnam::      Generate name for a temporary file
       * ungetc::      Push data back into a stream
       * ungetwc::     Push wide character data back into a stream
       * vfprintf::    Format variable argument list
       * vfscanf::     Scan variable argument list
       * vfwprintf::   Format variable wide character argument list
       * vfwscanf::    Scan and format argument list from wide character input
       * viprintf::    Format variable argument list (integer only)
       * viscanf::     Scan variable format list (integer only)

       6 Strings and Memory (`string.h') *********************************

       This chapter describes string-handling functions and functions for man‐
       aging   areas   of  memory.   The  corresponding	 declarations  are  in
       `string.h'.

       * Menu:

       * bcmp::	       Compare two memory areas
       * bcopy::       Copy memory regions
       * bzero::       Initialize memory to zero
       * index::       Search for character in string
       * memccpy::     Copy memory regions up to end-token
       * memchr::      Find character in memory
       * memcmp::      Compare two memory areas
       * memcpy::      Copy memory regions
       * memmem::      Find memory segment
       * memmove::     Move possibly overlapping memory
       * mempcpy::    Copy memory regions and locate end
       * memset::      Set an area of memory
       * rindex::      Reverse search for character in string
       * stpcpy::      Copy string returning a pointer to its end
       * stpncpy::     Counted copy string returning a pointer to its end
       * strcasecmp:: Compare strings ignoring case
       * strcasestr:: Find string segment ignoring case
       * strcat::      Concatenate strings
       * strchr::      Search for character in string
       * strcmp::      Character string compare
       * strcoll::     Locale-specific character string compare
       * strcpy::      Copy string
       * strcspn::     Count chars not in string
       * strerror::    Convert error number to string
       * strerror_r::  Convert error number to string
       * strlen::      Character string length
       * strlwr::     Convert string to lowercase
       * strncasecmp::	   Compare strings ignoring case
       * strncat::     Concatenate strings
       * strncmp::     Character string compare
       * strncpy::     Counted copy string
       * strnlen::     Character string length
       * strpbrk::     Find chars in string
       * strrchr::     Reverse search for character in string
       * strspn::      Find initial match
       * strstr::      Find string segment
       * strtok::      Get next token from a string
       * strupr::     Convert string to upper case
       * strxfrm::     Transform string
       * swab::	       Swap adjacent bytes
       * wcscasecmp::  Compare wide character strings ignoring case
       * wcsdup::      Wide character string duplicate
       * wcsncasecmp:: Compare wide character strings ignoring case

       8 Signal Handling (`signal.h') ******************************

       A "signal" is an event that interrupts the normal flow  of  control  in
       your program.  Your operating environment normally defines the full set
       of signals available (see `sys/signal.h'), as well as the default means
       of  dealing  with them--typically, either printing an error message and
       aborting your program, or ignoring the signal.

	  All systems support at least the following signals: `SIGABRT'
	    Abnormal termination of a program; raised by the <<abort>>
	    function.

       `SIGFPE'
	    A domain error in arithmetic, such as overflow, or division by
	    zero.

       `SIGILL'
	    Attempt to execute as a function data that is not executable.

       `SIGINT'
	    Interrupt; an interactive attention signal.

       `SIGSEGV'
	    An attempt to access a memory location that is not available.

       `SIGTERM'
	    A request that your program end execution.

	  Two functions are  available	for  dealing  with  asynchronous  sig‐
       nals--one  to  allow  your  program  to send signals to itself (this is
       called "raising" a signal), and	one  to	 specify  subroutines  (called
       "handlers"  to  handle  particular  signals  that  you  anticipate  may
       occur--whether raised by your own program or the operating environment.

	  To support these functions, `signal.h' defines three macros:

       `SIG_DFL'
	    Used with the `signal' function in place of a pointer to a handler
	    subroutine, to select the operating environment's default handling
	    of a signal.

       `SIG_IGN'
	    Used with the `signal' function in place of a pointer to a
	    handler, to ignore a particular signal.

       `SIG_ERR'
	    Returned by the `signal' function in place of a pointer to a
	    handler, to indicate that your request to set up a handler could
	    not be honored for some reason.

	  `signal.h' also defines an integral type, `sig_atomic_t'.  This type
       is  not used in any function declarations; it exists only to allow your
       signal handlers to declare a static storage  location  where  they  may
       store  a	 signal value.	(Static storage is not otherwise reliable from
       signal handlers.)

       * Menu:

       * raise::   Send a signal
       * signal::  Specify handler subroutine for a signal

       9 Time Functions (`time.h') ***************************

       This chapter  groups  functions	used  either  for  reporting  on  time
       (elapsed, current, or compute time) or to perform calculations based on
       time.

	  The  header  file  `time.h'  defines	three  types.	`clock_t'  and
       `time_t'	 are  both used for representations of time particularly suit‐
       able for arithmetic.   (In  this	 implementation,  quantities  of  type
       `clock_t'  have	the  highest  resolution possible on your machine, and
       quantities of type `time_t' resolve  to	seconds.)   `size_t'  is  also
       defined if necessary for quantities representing sizes.

	  `time.h'  also defines the structure `tm' for the traditional repre‐
       sentation of Gregorian calendar time as a series of numbers,  with  the
       following fields:

       `tm_sec'
	    Seconds, between 0 and 60 inclusive (60 allows for leap seconds).

       `tm_min'
	    Minutes, between 0 and 59 inclusive.

       `tm_hour'
	    Hours, between 0 and 23 inclusive.

       `tm_mday'
	    Day of the month, between 1 and 31 inclusive.

       `tm_mon'
	    Month, between 0 (January) and 11 (December).

       `tm_year'
	    Year (since 1900), can be negative for earlier years.

       `tm_wday'
	    Day of week, between 0 (Sunday) and 6 (Saturday).

       `tm_yday'
	    Number of days elapsed since last January 1, between 0 and 365
	    inclusive.

       `tm_isdst'
	    Daylight Savings Time flag: positive means DST in effect, zero
	    means DST not in effect, negative means no information about DST
	    is available.  Although for mktime(), negative means that it
	    should decide if DST is in effect or not.

       * Menu:

       * asctime::     Format time as string
       * clock::       Cumulative processor time
       * ctime::       Convert time to local and format as string
       * difftime::    Subtract two times
       * gmtime::      Convert time to UTC (GMT) traditional representation
       * localtime::   Convert time to local representation
       * mktime::      Convert time to arithmetic representation
       * strftime::    Convert date and time to a user-formatted string
       * time::	       Get current calendar time (as single number)
       * __tz_lock::   Lock time zone global variables
       * tzset::       Set timezone info

       10 Locale (`locale.h') **********************

       A  "locale"  is the name for a collection of parameters (affecting col‐
       lating sequences and formatting	conventions)  that  may	 be  different
       depending  on  location	or  culture.  The `"C"' locale is the only one
       defined in the ANSI C standard.

	  This is a minimal implementation, supporting only the required `"C"'
       value  for  locale; strings representing other locales are not honored.
       (`""' is also accepted; it represents the default locale for an	imple‐
       mentation, here equivalent to `"C"'.

	  `locale.h'  defines the structure `lconv' to collect the information
       on a locale, with the following fields:

       `char *decimal_point'
	    The decimal point character used to format "ordinary" numbers (all
	    numbers except those referring to amounts of money).  `"."' in the
	    C locale.

       `char *thousands_sep'
	    The character (if any) used to separate groups of digits, when
	    formatting ordinary numbers.  `""' in the C locale.

       `char *grouping'
	    Specifications for how many digits to group (if any grouping is
	    done at all) when formatting ordinary numbers.  The _numeric
	    value_ of each character in the string represents the number of
	    digits for the next group, and a value of `0' (that is, the
	    string's trailing `NULL') means to continue grouping digits using
	    the last value specified.  Use `CHAR_MAX' to indicate that no
	    further grouping is desired.  `""' in the C locale.

       `char *int_curr_symbol'
	    The international currency symbol (first three characters), if
	    any, and the character used to separate it from numbers.  `""' in
	    the C locale.

       `char *currency_symbol'
	    The local currency symbol, if any.	`""' in the C locale.

       `char *mon_decimal_point'
	    The symbol used to delimit fractions in amounts of money.  `""' in
	    the C locale.

       `char *mon_thousands_sep'
	    Similar to `thousands_sep', but used for amounts of money.	`""'
	    in the C locale.

       `char *mon_grouping'
	    Similar to `grouping', but used for amounts of money.  `""' in the
	    C locale.

       `char *positive_sign'
	    A string to flag positive amounts of money when formatting.	 `""'
	    in the C locale.

       `char *negative_sign'
	    A string to flag negative amounts of money when formatting.	 `""'
	    in the C locale.

       `char int_frac_digits'
	    The number of digits to display when formatting amounts  of	 money
       to
	    international conventions.	`CHAR_MAX' (the largest number
	    representable as a `char') in the C locale.

       `char frac_digits'
	    The	 number	 of digits to display when formatting amounts of money
       to
	    local conventions.	`CHAR_MAX' in the C locale.

       `char p_cs_precedes'
	    `1' indicates the local currency symbol is used before a _positive
	    or zero_ formatted amount of money; `0' indicates the currency
	    symbol is placed after the formatted number.  `CHAR_MAX' in the C
	    locale.

       `char p_sep_by_space'
	    `1' indicates the local currency symbol must be separated from
	    _positive or zero_ numbers by a space; `0' indicates that it is
	    immediately adjacent to numbers.  `CHAR_MAX' in the C locale.

       `char n_cs_precedes'
	    `1' indicates the local currency symbol is used before a
	    _negative_ formatted amount of money; `0' indicates the currency
	    symbol is placed after the formatted number.  `CHAR_MAX' in the C
	    locale.

       `char n_sep_by_space'
	    `1' indicates the local currency symbol must be separated from
	    _negative_ numbers by a space; `0' indicates that it is
	    immediately adjacent to numbers.  `CHAR_MAX' in the C locale.

       `char p_sign_posn'
	    Controls the position of the _positive_ sign for numbers
	    representing money.	 `0' means parentheses surround the number;
	    `1' means the sign is placed before both the number and the
	    currency symbol; `2' means the sign is placed after both the  num‐
       ber
	    and the currency symbol; `3' means the sign is placed just before
	    the currency symbol; and `4' means the sign is placed just after
	    the currency symbol.  `CHAR_MAX' in the C locale.

       `char n_sign_posn'
	    Controls the position of the _negative_ sign for numbers
	    representing money, using the same rules as `p_sign_posn'.
	    `CHAR_MAX' in the C locale.

       * Menu:

       * setlocale::  Select or query locale

       11 Reentrancy *************

       Reentrancy is a characteristic of library functions which allows multi‐
       ple processes to use the same address space  with  assurance  that  the
       values  stored in those spaces will remain constant between calls.  The
       Red Hat newlib implementation of the  library  functions	 ensures  that
       whenever	 possible,  these  library  functions are reentrant.  However,
       there are some functions that can  not  be  trivially  made  reentrant.
       Hooks have been provided to allow you to use these functions in a fully
       reentrant fashion.

	  These hooks use the structure	 `_reent'  defined  in	`reent.h'.   A
       variable defined as `struct _reent' is called a "reentrancy structure".
       All functions which must manipulate global information are available in
       two  versions.  The first version has the usual name, and uses a single
       global instance of the reentrancy structure.  The second has a  differ‐
       ent  name,  normally  formed  by prepending `_' and appending `_r', and
       takes a pointer to the particular reentrancy structure to use.

	  For example, the function `fopen'  takes  two	 arguments,  FILE  and
       MODE,   and   uses  the	global	reentrancy  structure.	 The  function
       `_fopen_r' takes the arguments, STRUCT_REENT, which is a pointer to  an
       instance of the reentrancy structure, FILE and MODE.

	  There	 are two versions of `struct _reent', a normal one and one for
       small memory systems, controlled by the `_REENT_SMALL' definition  from
       the (automatically included) `<sys/config.h>'.

	  Each	function  which	 uses the global reentrancy structure uses the
       global variable `_impure_ptr', which points to a reentrancy structure.

	  This means that you have  two	 ways  to  achieve  reentrancy.	  Both
       require	that  each  thread  of	execution  control initialize a unique
       global variable of type `struct _reent':

	 1. Use the reentrant versions of the library functions, after
	    initializing a global reentrancy structure for each process.  Use
	    the pointer to this structure as the extra argument for all
	    library functions.

	 2. Ensure that each thread of execution control has a pointer to its
	    own unique reentrancy structure in the global variable
	    `_impure_ptr', and call the standard library subroutines.

	  The following functions are provided in both reentrant and non-reen‐
       trant versions.

       _Equivalent for errno variable:_
	    _errno_r

       _Locale functions:_
	    _localeconv_r  _setlocale_r

       _Equivalents for stdio variables:_
	    _stdin_r	    _stdout_r	    _stderr_r

       _Stdio functions:_
	    _fdopen_r	    _perror_r	    _tempnam_r
	    _fopen_r	    _putchar_r	    _tmpnam_r
	    _getchar_r	    _puts_r	    _tmpfile_r
	    _gets_r	    _remove_r	    _vfprintf_r
	    _iprintf_r	    _rename_r	    _vsnprintf_r
	    _mkstemp_r	    _snprintf_r	    _vsprintf_r
	    _mktemp_t	    _sprintf_r

       _Signal functions:_
	    _init_signal_r  _signal_r
	    _kill_r	    __sigtramp_r
	    _raise_r

       _Stdlib functions:_
	    _calloc_r	    _mblen_r	    _setenv_r
	    _dtoa_r	    _mbstowcs_r	    _srand_r
	    _free_r	    _mbtowc_r	    _strtod_r
	    _getenv_r	    _memalign_r	    _strtol_r
	    _mallinfo_r	    _mstats_r	    _strtoul_r
	    _malloc_r	    _putenv_r	    _system_r
	    _malloc_r	    _rand_r	    _wcstombs_r
	    _malloc_stats_r _realloc_r	    _wctomb_r

       _String functions:_
	    _strdup_r	    _strtok_r

       _System functions:_
	    _close_r	    _link_r	    _unlink_r
	    _execve_r	    _lseek_r	    _wait_r
	    _fcntl_r	    _open_r	    _write_r
	    _fork_r	    _read_r
	    _fstat_r	    _sbrk_r
	    _gettimeofday_r _stat_r
	    _getpid_r	    _times_r

       _Additional 64-bit I/O System functions:_
	    _fstat64_r	   _lseek64_r	  _open64_r

       _Time function:_
	    _asctime_r

       12	   Miscellaneous	  Macros	 and	     Functions
       *************************************

       This chapter describes miscellaneous routines not covered elsewhere.

       * Menu:

       * ffs::	    Return first bit set in a word
       * unctrl::   Return printable representation of a character

       14 System Calls ***************

       The C subroutine library depends on a handful of subroutine  calls  for
       operating  system  services.  If you use the C library on a system that
       complies with the POSIX.1 standard (also known as IEEE 1003.1), most of
       these subroutines are supplied with your operating system.

	  If  some  of these subroutines are not provided with your system--in
       the extreme case, if you are developing software	 for  a	 "bare	board"
       system,	without	 an  OS--you  will at least need to provide do-nothing
       stubs (or subroutines with minimal functionality) to  allow  your  pro‐
       grams to link with the subroutines in `libc.a'.

       * Menu:

       * Stubs::      Definitions for OS interface
       * Reentrant Syscalls::	Reentrant covers for OS subroutines

       14.1 Definitions for OS interface

       This  is the complete set of system definitions (primarily subroutines)
       required;  the  examples	 shown	implement  the	minimal	 functionality
       required to allow `libc' to link, and fail gracefully where OS services
       are not available.

	  Graceful failure is permitted by returning an error code.   A	 minor
       complication  arises here: the C library must be compatible with devel‐
       opment environments that supply fully functional versions of these sub‐
       routines.   Such	 environments  usually	return error codes in a global
       `errno'.	 However, the Red Hat newlib C library provides a _macro_ def‐
       inition	for  `errno' in the header file `errno.h', as part of its sup‐
       port for reentrant routines (*note Reentrancy: Reentrancy.).

	  The bridge between these two interpretations of `errno' is straight‐
       forward:	 the  C	 library  routines with OS interface calls capture the
       `errno' values returned globally, and record them  in  the  appropriate
       field of the reentrancy structure (so that you can query them using the
       `errno' macro from `errno.h').

	  This mechanism becomes visible when you write stub routines  for  OS
       interfaces.    You must include `errno.h', then disable the macro, like
       this:

	    #include <errno.h>
	    #undef errno
	    extern int errno;

       The examples in this chapter include this treatment of `errno'.

       `_exit'
	    Exit a program without cleaning up files.  If your system doesn't
	    provide this, it is best to avoid linking with subroutines that
	    require it (`exit', `system').

       `close'
	    Close a file.  Minimal implementation:

		 int close(int file) {
		   return -1;
		 }

       `environ'
	    A pointer to a list of environment variables and their values.
	    For a minimal environment, this empty list is adequate:

		 char *__env[1] = { 0 };
		 char **environ = __env;

       `execve'
	    Transfer control to a new process.	Minimal implementation (for a
	    system without processes):

		 #include <errno.h>
		 #undef errno
		 extern int errno;
		 int execve(char *name, char **argv, char **env) {
		   errno = ENOMEM;
		   return -1;
		 }

       `fork'
	    Create a new process.  Minimal implementation (for a system
	    without processes):

		 #include <errno.h>
		 #undef errno
		 extern int errno;
		 int fork(void) {
		   errno = EAGAIN;
		   return -1;
		 }

       `fstat'
	    Status of an open file.  For consistency with other minimal
	    implementations in these examples, all files are regarded as
	    character special devices.	The `sys/stat.h' header file required
	    is distributed in the `include' subdirectory for this C library.

		 #include <sys/stat.h>
		 int fstat(int file, struct stat *st) {
		   st->st_mode = S_IFCHR;
		   return 0;
		 }

       `getpid'
	    Process-ID; this is sometimes used to generate strings unlikely to
	    conflict with other processes.  Minimal implementation, for a
	    system without processes:

		 int getpid(void) {
		   return 1;
		 }

       `isatty'
	    Query whether output stream is a terminal.	 For consistency with
	    the other minimal implementations, which only support output to
	    `stdout', this minimal implementation is suggested:

		 int isatty(int file) {
		   return 1;
		 }

       `kill'
	    Send a signal.  Minimal implementation:

		 #include <errno.h>
		 #undef errno
		 extern int errno;
		 int kill(int pid, int sig) {
		   errno = EINVAL;
		   return -1;
		 }

       `link'
	    Establish a new name for an existing  file.	  Minimal  implementa‐
       tion:

		 #include <errno.h>
		 #undef errno
		 extern int errno;
		 int link(char *old, char *new) {
		   errno = EMLINK;
		   return -1;
		 }

       `lseek'
	    Set position in a file.  Minimal implementation:

		 int lseek(int file, int ptr, int dir) {
		   return 0;
		 }

       `open'
	    Open a file.  Minimal implementation:

		 int open(const char *name, int flags, int mode) {
		   return -1;
		 }

       `read'
	    Read from a file.  Minimal implementation:

		 int read(int file, char *ptr, int len) {
		   return 0;
		 }

       `sbrk'
	    Increase program data space.  As `malloc' and related functions
	    depend  on	this,  it  is useful to have a working implementation.
       The
	    following suffices for a standalone system; it exploits the symbol
	    `_end' automatically defined by the GNU linker.

		 caddr_t sbrk(int incr) {
		   extern char _end;	  /* Defined by the linker */
		   static char *heap_end;
		   char *prev_heap_end;

		   if (heap_end == 0) {
		     heap_end = &_end;
		   }
		   prev_heap_end = heap_end;
		   if (heap_end + incr > stack_ptr) {
		     write (1, "Heap and stack collision0, 25);
		     abort ();
		   }

		   heap_end += incr;
		   return (caddr_t) prev_heap_end;
		 }

       `stat'
	    Status of a file (by name).	 Minimal implementation:

		 int stat(char *file, struct stat *st) {
		   st->st_mode = S_IFCHR;
		   return 0;
		 }

       `times'
	    Timing information for current process.  Minimal implementation:

		 int times(struct tms *buf) {
		   return -1;
		 }

       `unlink'
	    Remove a file's directory entry.  Minimal implementation:

		 #include <errno.h>
		 #undef errno
		 extern int errno;
		 int unlink(char *name) {
		   errno = ENOENT;
		   return -1;
		 }

       `wait'
	    Wait for a child process.  Minimal implementation:
		 #include <errno.h>
		 #undef errno
		 extern int errno;
		 int wait(int *status) {
		   errno = ECHILD;
		   return -1;
		 }

       `write'
	    Write to a file.  `libc' subroutines will use this system routine
	    for output to all files, _including_ `stdout'--so if you need to
	    generate any output, for example to a serial port for debugging,
	    you should make your minimal `write' capable of doing this.	 The
	    following minimal implementation is an incomplete example; it
	    relies on a `outbyte' subroutine (not shown; typically, you must
	    write this in assembler from examples provided by your hardware
	    manufacturer) to actually perform the output.

		 int write(int file, char *ptr, int len) {
		   int todo;

		   for (todo = 0; todo < len; todo++) {
		     outbyte (*ptr++);
		   }
		   return len;
		 }

       14.2 Reentrant covers for OS subroutines

       Since the system subroutines are used by other  library	routines  that
       require	reentrancy, `libc.a' provides cover routines (for example, the
       reentrant version of `fork' is `_fork_r').  These  cover	 routines  are
       consistent  with	 the  other reentrant subroutines in this library, and
       achieve reentrancy by using a reserved global data block	 (*note	 Reen‐
       trancy: Reentrancy.).

       `_open_r'
	    A reentrant version of `open'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _open_r(void *REENT,
		     const char *FILE, int FLAGS, int MODE);

       `_open64_r'
	    A reentrant version of `open64'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _open64_r(void *REENT,
		     const char *FILE, int FLAGS, int MODE);

       `_close_r'
	    A reentrant version of `close'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _close_r(void *REENT, int FD);

       `_lseek_r'
	    A reentrant version of `lseek'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 off_t _lseek_r(void *REENT,
		     int FD, off_t POS, int WHENCE);

       `_lseek64_r'
	    A  reentrant  version  of  `lseek64'.   It	takes a pointer to the
       global
	    data block, which holds `errno'.

		 off_t _lseek64_r(void *REENT,
		     int FD, off_t POS, int WHENCE);

       `_read_r'
	    A reentrant version of `read'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 long _read_r(void *REENT,
		     int FD, void *BUF, size_t CNT);

       `_write_r'
	    A reentrant version of `write'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 long _write_r(void *REENT,
		     int FD, const void *BUF, size_t CNT);

       `_fork_r'
	    A reentrant version of `fork'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _fork_r(void *REENT);

       `_wait_r'
	    A reentrant version of `wait'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _wait_r(void *REENT, int *STATUS);

       `_stat_r'
	    A reentrant version of `stat'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _stat_r(void *REENT,
		     const char *FILE, struct stat *PSTAT);

       `_fstat_r'
	    A reentrant version of `fstat'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _fstat_r(void *REENT,
		     int FD, struct stat *PSTAT);

       `_fstat64_r'
	    A reentrant version of `fstat64'.	It  takes  a  pointer  to  the
       global
	    data block, which holds `errno'.

		 int _fstat64_r(void *REENT,
		     int FD, struct stat *PSTAT);

       `_link_r'
	    A reentrant version of `link'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _link_r(void *REENT,
		     const char *OLD, const char *NEW);

       `_unlink_r'
	    A reentrant version of `unlink'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 int _unlink_r(void *REENT, const char *FILE);

       `_sbrk_r'
	    A reentrant version of `sbrk'.  It takes a pointer to the global
	    data block, which holds `errno'.

		 char *_sbrk_r(void *REENT, size_t INCR);

       15 Variable Argument Lists **************************

       The `printf' family of functions is defined to accept a variable number
       of arguments, rather than a fixed argument list.	 You can  define  your
       own functions with a variable argument list, by using macro definitions
       from  either  `stdarg.h'	 (for  compatibility  with  ANSI  C)  or  from
       `varargs.h'  (for compatibility with a popular convention prior to ANSI
       C).

       * Menu:

       * Stdarg::
       * Varargs::

       15.1 ANSI-standard macros, `stdarg.h'

       In ANSI C, a function has a  variable  number  of  arguments  when  its
       parameter  list	ends  in an ellipsis (`...').  The parameter list must
       also include at least one explicitly named argument; that  argument  is
       used to initialize the variable list data structure.

	  ANSI	C defines three macros (`va_start', `va_arg', and `va_end') to
       operate on variable argument lists.  `stdarg.h' also defines a  special
       type  to	 represent  variable  argument	lists:	this  type  is	called
       `va_list'.

       * Menu:

       * va_start::
       * va_arg::
       * va_end::

       15.2 Traditional macros, `varargs.h'

       If your C compiler predates ANSI C, you may still be able to use	 vari‐
       able  argument lists using the macros from the `varargs.h' header file.
       These macros resemble their ANSI counterparts, but have important  dif‐
       ferences in usage.   In particular, since traditional C has no declara‐
       tion mechanism for variable argument lists, two additional  macros  are
       provided	 simply	 for  the  purpose of defining functions with variable
       argument lists.

	  As with `stdarg.h', the type `va_list' is used to hold a data struc‐
       ture representing a variable argument list.

       * Menu:

       * va_alist::
       * va_start-trad::
       * va_arg-trad::
       * va_end-trad::

       Index *****

      [inde] * Menu:

       *   __env_lock:				   __env_lock.		 (line
       6)
       *  __env_unlock:				  __env_lock.		 (line
       6)
       *   __malloc_lock:			   __malloc_lock.	 (line
       6)
       *  __malloc_unlock:			  __malloc_lock.	 (line
       6)
       *   __tz_lock:				   __tz_lock.		 (line
       6)
       *  __tz_unlock:				  __tz_lock.		 (line
       6)
       *   _asctime_r:				   asctime.		 (line
       6)
       *  _asiprintf_r:				  siprintf.		 (line
       6)
       *   _asniprintf_r:			   siprintf.		 (line
       6)
       *  _asnprintf_r:				  sprintf.		 (line
       6)
       *   _asprintf_r:				   sprintf.		 (line
       6)
       *  _atoi_r:				  atoi.			 (line
       6)
       *   _atol_r:				   atoi.		 (line
       6)
       *  _atoll_r:				  atoll.		 (line
       6)
       *   _calloc_r:				   calloc.		 (line
       6)
       *  _close_r:				  Reentrant  Syscalls.	 (line
       27)
       *   _diprintf_r:				   diprintf.		 (line
       6)
       *  _dprintf_r:				  dprintf.		 (line
       6)
       *   _exit:				   Stubs.		 (line
       35)
       *  _Exit:				  _Exit.		 (line
       6)
       *   _fclose_r:				   fclose.		 (line
       6)
       *  _fcloseall_r:				  fcloseall.		 (line
       6)
       *   _fdopen_r:				   fdopen.		 (line
       6)
       *  _fflush_r:				  fflush.		 (line
       6)
       *   _fgetc_r:				   fgetc.		 (line
       6)
       *  _fgetpos64_r:				  fgetpos64.		 (line
       6)
       *   _fgetpos_r:				   fgetpos.		 (line
       6)
       *  _fgets_r:				  fgets.		 (line
       6)
       *   _fgetwc_r:				   fgetwc.		 (line
       6)
       *  _fgetws_r:				  fgetws.		 (line
       6)
       *   _fiprintf_r:				   siprintf.		 (line
       6)
       *  _fiscanf_r:				  siscanf.		 (line
       6)
       *   _fopen64_r:				   fopen64.		 (line
       6)
       *  _fopen_r:				  fopen.		 (line
       6)
       *  _fork_r:				  Reentrant  Syscalls.	 (line
       61)
       *  _fprintf_r:				  sprintf.		 (line
       6)
       *   _fpurge_r:				   fpurge.		 (line
       6)
       *  _fputc_r:				  fputc.		 (line
       6)
       *   _fputs_r:				   fputs.		 (line
       6)
       *  _fputwc_r:				  fputwc.		 (line
       6)
       *   _fputws_r:				   fputws.		 (line
       6)
       *  _fread_r:				  fread.		 (line
       6)
       *   _free_r:				   malloc.		 (line
       6)
       *  _freopen64_r:				  freopen64.		 (line
       6)
       *   _freopen_r:				   freopen.		 (line
       6)
       *  _fscanf_r:				  sscanf.		 (line
       6)
       *   _fseek_r:				   fseek.		 (line
       6)
       *  _fseeko64_r:				  fseeko64.		 (line
       6)
       *   _fseeko_r:				   fseek.		 (line
       6)
       *  _fsetpos64_r:				  fsetpos64.		 (line
       6)
       *   _fsetpos_r:				   fsetpos.		 (line
       6)
       *  _fstat_r:				  Reentrant  Syscalls.	 (line
       80)
       *   _ftell_r:				   ftell.		 (line
       6)
       *  _ftello64_r:				  ftello64.		 (line
       6)
       *   _ftello_r:				   ftell.		 (line
       6)
       *  _fwide_r:				  fwide.		 (line
       6)
       *   _fwprintf_r:				   swprintf.		 (line
       6)
       *  _fwrite_r:				  fwrite.		 (line
       6)
       *   _fwscanf_r:				   swscanf.		 (line
       6)
       *  _getc_r:				  getc.			 (line
       6)
       *   _getc_unlocked_r:			   getc_unlocked.	 (line
       6)
       *  _getchar_r:				  getchar.		 (line
       6)
       *   _getchar_unlocked_r:			   getchar_unlocked.	 (line
       6)
       *  _gets_r:				  gets.			 (line
       6)
       *   _getwc_r:				   fgetwc.		 (line
       6)
       *  _getwchar_r:				  getwchar.		 (line
       6)
       *   _impure_ptr:				   Reentrancy.		 (line
       32)
       *  _iprintf_r:				  siprintf.		 (line
       6)
       *   _iscanf_r:				   siscanf.		 (line
       6)
       *  _link_r:				  Reentrant  Syscalls.	 (line
       94)
       *   _localeconv_r:			   setlocale.		 (line
       6)
       *  _lseek_r:				  Reentrant  Syscalls.	 (line
       33)
       *   _mallinfo_r:				   mallinfo.		 (line
       6)
       *  _malloc_r:				  malloc.		 (line
       6)
       *   _malloc_stats_r:			   mallinfo.		 (line
       6)
       *  _malloc_usable_size_r:		  malloc.		 (line
       6)
       *   _mallopt_r:				   mallinfo.		 (line
       6)
       *  _mbsnrtowcs_r:			  mbsrtowcs.		 (line
       6)
       *   _mbsrtowcs_r:			   mbsrtowcs.		 (line
       6)
       *  _memalign_r:				  malloc.		 (line
       6)
       *   _mkdtemp_r:				   mktemp.		 (line
       6)
       *  _mkstemp_r:				  mktemp.		 (line
       6)
       *   _mkstemps_r:				   mktemp.		 (line
       6)
       *  _mktemp_r:				  mktemp.		 (line
       6)
       *  _open_r:				  Reentrant  Syscalls.	 (line
       13)
       *  _perror_r:				  perror.		 (line
       6)
       *   _printf_r:				   sprintf.		 (line
       6)
       *  _putc_r:				  putc.			 (line
       6)
       *   _putc_unlocked_r:			   putc_unlocked.	 (line
       6)
       *  _putchar_r:				  putchar.		 (line
       6)
       *   _puts_r:				   puts.		 (line
       6)
       *  _putwc_r:				  fputwc.		 (line
       6)
       *   _putwchar_r:				   putwchar.		 (line
       6)
       *  _raise_r:				  raise.		 (line
       6)
       *  _read_r:				  Reentrant  Syscalls.	 (line
       47)
       *  _realloc_r:				  malloc.		 (line
       6)
       *   _reallocf_r:				   malloc.		 (line
       6)
       *  _reent:				  Reentrancy.		 (line
       15)
       *   _remove_r:				   remove.		 (line
       6)
       *  _rewind_r:				  rewind.		 (line
       6)
       *  _sbrk_r:				  Reentrant  Syscalls.	 (line
       107)
       *  _scanf_r:				  sscanf.		 (line
       6)
       *   _setlocale_r:			   setlocale.		 (line
       6)
       *  _signal_r:				  signal.		 (line
       6)
       *   _siprintf_r:				   siprintf.		 (line
       6)
       *  _siscanf_r:				  siscanf.		 (line
       6)
       *   _sniprintf_r:			   siprintf.		 (line
       6)
       *  _snprintf_r:				  sprintf.		 (line
       6)
       *   _sprintf_r:				   sprintf.		 (line
       6)
       *  _sscanf_r:				  sscanf.		 (line
       6)
       *  _stat_r:				  Reentrant  Syscalls.	 (line
       73)
       *  _strtod_r:				  strtod.		 (line
       6)
       *   _strtol_r:				   strtol.		 (line
       6)
       *  _strtoll_r:				  strtoll.		 (line
       6)
       *   _strtoul_r:				   strtoul.		 (line
       6)
       *  _strtoull_r:				  strtoull.		 (line
       6)
       *   _swprintf_r:				   swprintf.		 (line
       6)
       *  _swscanf_r:				  swscanf.		 (line
       6)
       *   _system_r:				   system.		 (line
       6)
       *  _tempnam_r:				  tmpnam.		 (line
       6)
       *   _tmpfile64_r:			   tmpfile64.		 (line
       6)
       *  _tmpfile_r:				  tmpfile.		 (line
       6)
       *   _tmpnam_r:				   tmpnam.		 (line
       6)
       *  _tolower:				  tolower.		 (line
       6)
       *   _toupper:				   toupper.		 (line
       6)
       *  _tzset_r:				  tzset.		 (line
       6)
       *   _ungetc_r:				   ungetc.		 (line
       6)
       *  _ungetwc_r:				  ungetwc.		 (line
       6)
       *  _unlink_r:				  Reentrant  Syscalls.	 (line
       101)
       *  _vasiprintf_r:			  viprintf.		 (line
       6)
       *   _vasniprintf_r:			   viprintf.		 (line
       6)
       *  _vasnprintf_r:			  vfprintf.		 (line
       6)
       *   _vasprintf_r:			   vfprintf.		 (line
       6)
       *  _vdiprintf_r:				  diprintf.		 (line
       6)
       *   _vdprintf_r:				   dprintf.		 (line
       6)
       *  _vfiprintf_r:				  viprintf.		 (line
       6)
       *   _vfiscanf_r:				   viscanf.		 (line
       6)
       *  _vfprintf_r:				  vfprintf.		 (line
       6)
       *   _vfscanf_r:				   vfscanf.		 (line
       6)
       *  _vfwprintf_r:				  vfwprintf.		 (line
       6)
       *   _vfwscanf:				   vfwscanf.		 (line
       6)
       *  _viprintf_r:				  viprintf.		 (line
       6)
       *   _viscanf_r:				   viscanf.		 (line
       6)
       *  _vprintf_r:				  vfprintf.		 (line
       6)
       *   _vscanf_r:				   vfscanf.		 (line
       6)
       *  _vsiprintf_r:				  viprintf.		 (line
       6)
       *   _vsiscanf_r:				   viscanf.		 (line
       6)
       *  _vsniprintf_r:			  viprintf.		 (line
       6)
       *   _vsnprintf_r:			   vfprintf.		 (line
       6)
       *  _vsprintf_r:				  vfprintf.		 (line
       6)
       *   _vsscanf_r:				   vfscanf.		 (line
       6)
       *  _vswprintf_r:				  vfwprintf.		 (line
       6)
       *   _vswscanf:				   vfwscanf.		 (line
       6)
       *  _vwprintf_r:				  vfwprintf.		 (line
       6)
       *   _vwscanf:				   vfwscanf.		 (line
       6)
       *  _wait_r:				  Reentrant  Syscalls.	 (line
       67)
       *   _wcsdup_r:				   wcsdup.		 (line
       6)
       *  _wcsnrtombs_r:			  wcsrtombs.		 (line
       6)
       *   _wcsrtombs_r:			   wcsrtombs.		 (line
       6)
       *  _wcstod_r:				  wcstod.		 (line
       6)
       *   _wcstof_r:				   wcstod.		 (line
       6)
       *  _wcstol_r:				  wcstol.		 (line
       6)
       *   _wcstoll_r:				   wcstoll.		 (line
       6)
       *  _wcstoul_r:				  wcstoul.		 (line
       6)
       *   _wcstoull_r:				   wcstoull.		 (line
       6)
       *  _wprintf_r:				  swprintf.		 (line
       6)
       *  _write_r:				  Reentrant  Syscalls.	 (line
       54)
       *  _wscanf_r:				  swscanf.		 (line
       6)
       *   a64l:				   a64l.		 (line
       6)
       *  abort:				  abort.		 (line
       6)
       *   abs:					   abs.			 (line
       6)
       *  asctime:				  asctime.		 (line
       6)
       *   asiprintf:				   siprintf.		 (line
       6)
       *  asniprintf:				  siprintf.		 (line
       6)
       *   asnprintf:				   sprintf.		 (line
       6)
       *  asprintf:				  sprintf.		 (line
       6)
       *   assert:				   assert.		 (line
       6)
       *  atexit:				  atexit.		 (line
       6)
       *   atof:				   atof.		 (line
       6)
       *  atoff:				  atof.			 (line
       6)
       *   atoi:				   atoi.		 (line
       6)
       *  atol:					  atoi.			 (line
       6)
       *   atoll:				   atoll.		 (line
       6)
       *  bcmp:					  bcmp.			 (line
       6)
       *   bsearch:				   bsearch.		 (line
       6)
       *  bzero:				  bzero.		 (line
       6)
       *   calloc:				   calloc.		 (line
       6)
       *  clearerr:				  clearerr.		 (line
       6)
       *   clock:				   clock.		 (line
       6)
       *  close:				  Stubs.		 (line
       40)
       *   ctime:				   ctime.		 (line
       6)
       *  ctime_r:				  ctime.		 (line
       6)
       *   difftime:				   difftime.		 (line
       6)
       *  diprintf:				  diprintf.		 (line
       6)
       *   div:					   div.			 (line
       6)
       *  dprintf:				  dprintf.		 (line
       6)
       *   drand48:				   rand48.		 (line
       6)
       *  ecvt:					  ecvt.			 (line
       6)
       *   ecvtbuf:				   ecvtbuf.		 (line
       6)
       *  ecvtf:				  ecvt.			 (line
       6)
       *  environ  <1>:				   Stubs.		 (line
       47)
       *  environ:				  getenv.		 (line
       6)
       *   erand48:				   rand48.		 (line
       6)
       * errno global  vs  macro:		   Stubs.		 (line
       19)
       *   execve:				   Stubs.		 (line
       54)
       *  exit:					  exit.			 (line
       6)
       *  extra	 argument,  reentrant  fns:	    Reentrancy.		 (line
       39)
       *  fclose:				  fclose.		 (line
       6)
       *   fcloseall:				   fcloseall.		 (line
       6)
       *  fcvt:					  ecvt.			 (line
       6)
       *   fcvtbuf:				   ecvtbuf.		 (line
       6)
       *  fcvtf:				  ecvt.			 (line
       6)
       *   fdopen:				   fdopen.		 (line
       6)
       *  feof:					  feof.			 (line
       6)
       *   ferror:				   ferror.		 (line
       6)
       *  fflush:				  fflush.		 (line
       6)
       *   ffs:					   ffs.			 (line
       6)
       *  fgetc:				  fgetc.		 (line
       6)
       *   fgetpos:				   fgetpos.		 (line
       6)
       *  fgetpos64:				  fgetpos64.		 (line
       6)
       *   fgets:				   fgets.		 (line
       6)
       *  fgetwc:				  fgetwc.		 (line
       6)
       *   fgetws:				   fgetws.		 (line
       6)
       *  fileno:				  fileno.		 (line
       6)
       *   fiprintf:				   siprintf.		 (line
       6)
       *  fiscanf:				  siscanf.		 (line
       6)
       *   fmemopen:				   fmemopen.		 (line
       6)
       *  fopen:				  fopen.		 (line
       6)
       *   fopen64:				   fopen64.		 (line
       6)
       *  fopencookie:				  fopencookie.		 (line
       6)
       *   fork:				   Stubs.		 (line
       66)
       *  fprintf:				  sprintf.		 (line
       6)
       *   fpurge:				   fpurge.		 (line
       6)
       *  fputc:				  fputc.		 (line
       6)
       *   fputs:				   fputs.		 (line
       6)
       *  fputwc:				  fputwc.		 (line
       6)
       *   fputws:				   fputws.		 (line
       6)
       *  fread:				  fread.		 (line
       6)
       *   free:				   malloc.		 (line
       6)
       *  freopen:				  freopen.		 (line
       6)
       *   freopen64:				   freopen64.		 (line
       6)
       *  fropen:				  funopen.		 (line
       6)
       *   fscanf:				   sscanf.		 (line
       6)
       *  fseek:				  fseek.		 (line
       6)
       *   fseeko:				   fseek.		 (line
       6)
       *  fseeko64:				  fseeko64.		 (line
       6)
       *   fsetpos:				   fsetpos.		 (line
       6)
       *  fsetpos64:				  fsetpos64.		 (line
       6)
       *   fstat:				   Stubs.		 (line
       78)
       *  ftell:				  ftell.		 (line
       6)
       *   ftello:				   ftell.		 (line
       6)
       *  ftello64:				  ftello64.		 (line
       6)
       *   funopen:				   funopen.		 (line
       6)
       *  fwide:				  fwide.		 (line
       6)
       *   fwopen:				   funopen.		 (line
       6)
       *  fwprintf:				  swprintf.		 (line
       6)
       *   fwrite:				   fwrite.		 (line
       6)
       *  fwscanf:				  swscanf.		 (line
       6)
       *   gcvt:				   gvcvt.		 (line
       6)
       *  gcvtf:				  gvcvt.		 (line
       6)
       *   getc:				   getc.		 (line
       6)
       *  getc_unlocked:			  getc_unlocked.	 (line
       6)
       *   getchar:				   getchar.		 (line
       6)
       *  getchar_unlocked:			  getchar_unlocked.	 (line
       6)
       *   getdelim:				   getdelim.		 (line
       6)
       *  getenv:				  getenv.		 (line
       6)
       *   getline:				   getline.		 (line
       6)
       *  getpid:				  Stubs.		 (line
       90)
       *   gets:				   gets.		 (line
       6)
       *  getw:					  getw.			 (line
       6)
       *   getwc:				   fgetwc.		 (line
       6)
       *  getwchar:				  getwchar.		 (line
       6)
       *  global  reentrancy  structure:	    Reentrancy.		 (line
       32)
       *  gmtime:				  gmtime.		 (line
       6)
       *   gmtime_r:				   gmtime.		 (line
       6)
       *  index:				  index.		 (line
       6)
       *   iprintf:				   siprintf.		 (line
       6)
       *  isalnum:				  isalnum.		 (line
       6)
       *   isalpha:				   isalpha.		 (line
       6)
       *  isascii:				  isascii.		 (line
       6)
       *   isatty:				   Stubs.		 (line
       99)
       *  iscanf:				  siscanf.		 (line
       6)
       *   iscntrl:				   iscntrl.		 (line
       6)
       *  isdigit:				  isdigit.		 (line
       6)
       *   isgraph:				   isprint.		 (line
       6)
       *  islower:				  islower.		 (line
       6)
       *   isprint:				   isprint.		 (line
       6)
       *  ispunct:				  ispunct.		 (line
       6)
       *   isspace:				   isspace.		 (line
       6)
       *  isupper:				  isupper.		 (line
       6)
       *   iswalnum:				   iswalnum.		 (line
       6)
       *  iswalpha:				  iswalpha.		 (line
       6)
       *   iswblank:				   iswblank.		 (line
       6)
       *  iswcntrl:				  iswcntrl.		 (line
       6)
       *   iswctype:				   iswctype.		 (line
       6)
       *  iswdigit:				  iswdigit.		 (line
       6)
       *   iswgraph:				   iswgraph.		 (line
       6)
       *  iswlower:				  iswlower.		 (line
       6)
       *   iswprint:				   iswprint.		 (line
       6)
       *  iswpunct:				  iswpunct.		 (line
       6)
       *   iswspace:				   iswspace.		 (line
       6)
       *  iswupper:				  iswupper.		 (line
       6)
       *   iswxdigit:				   iswxdigit.		 (line
       6)
       *  isxdigit:				  isxdigit.		 (line
       6)
       *   jrand48:				   rand48.		 (line
       6)
       *  kill:					  Stubs.		 (line
       108)
       *   l64a:				   a64l.		 (line
       6)
       *  labs:					  labs.			 (line
       6)
       *   lcong48:				   rand48.		 (line
       6)
       *  ldiv:					  ldiv.			 (line
       6)
       *   link:				   Stubs.		 (line
       119)
       * linking the  C	 library:		   Syscalls.		 (line
       6)
       *  list	of  reentrant  functions:	    Reentrancy.		 (line
       48)
       *  llabs:				  llabs.		 (line
       6)
       *   lldiv:				   lldiv.		 (line
       6)
       *  localeconv:				  setlocale.		 (line
       6)
       *   localtime:				   localtime.		 (line
       6)
       *  localtime_r:				  localtime.		 (line
       6)
       *   lrand48:				   rand48.		 (line
       6)
       *  lseek:				  Stubs.		 (line
       130)
       *   mallinfo:				   mallinfo.		 (line
       6)
       *  malloc:				  malloc.		 (line
       6)
       *   malloc_stats:			   mallinfo.		 (line
       6)
       *  malloc_usable_size:			  malloc.		 (line
       6)
       *   mallopt:				   mallinfo.		 (line
       6)
       *  mblen:				  mblen.		 (line
       6)
       *   mbsnrtowcs:				   mbsrtowcs.		 (line
       6)
       *  mbsrtowcs:				  mbsrtowcs.		 (line
       6)
       *   mbstowcs:				   mbstowcs.		 (line
       6)
       *  mbtowc:				  mbtowc.		 (line
       6)
       *   memalign:				   malloc.		 (line
       6)
       *  memchr:				  memchr.		 (line
       6)
       *   memcmp:				   memcmp.		 (line
       6)
       *  memmem:				  memmem.		 (line
       6)
       *   memmove:				   memmove.		 (line
       6)
       *  memset:				  memset.		 (line
       6)
       *   mkdtemp:				   mktemp.		 (line
       6)
       *  mkstemp:				  mktemp.		 (line
       6)
       *   mkstemps:				   mktemp.		 (line
       6)
       *  mktemp:				  mktemp.		 (line
       6)
       *   mktime:				   mktime.		 (line
       6)
       *  mrand48:				  rand48.		 (line
       6)
       *   nrand48:				   rand48.		 (line
       6)
       *  on_exit:				  on_exit.		 (line
       6)
       *   open:				   Stubs.		 (line
       137)
       *  open_memstream:			  open_memstream.	 (line
       6)
       *   open_wmemstream:			   open_memstream.	 (line
       6)
       * OS  interface	subroutines:		   Stubs.		 (line
       6)
       *   pclose:				   popen.		 (line
       6)
       *  perror:				  perror.		 (line
       6)
       *   popen:				   popen.		 (line
       6)
       *  printf:				  sprintf.		 (line
       6)
       *   putc:				   putc.		 (line
       6)
       *  putc_unlocked:			  putc_unlocked.	 (line
       6)
       *   putchar:				   putchar.		 (line
       6)
       *  putchar_unlocked:			  putchar_unlocked.	 (line
       6)
       *   puts:				   puts.		 (line
       6)
       *  putw:					  putw.			 (line
       6)
       *   putwc:				   fputwc.		 (line
       6)
       *  putwchar:				  putwchar.		 (line
       6)
       *   qsort:				   qsort.		 (line
       6)
       *  raise:				  raise.		 (line
       6)
       *   rand:				   rand.		 (line
       6)
       *  rand48:				  rand48.		 (line
       6)
       *   rand_r:				   rand.		 (line
       6)
       *  read:					  Stubs.		 (line
       144)
       *   realloc:				   malloc.		 (line
       6)
       *  reallocf:				  malloc.		 (line
       6)
       *   reent.h:				   Reentrancy.		 (line
       15)
       *  reentrancy:				  Reentrancy.		 (line
       6)
       *  reentrancy  structure:		   Reentrancy.		 (line
       15)
       * reentrant  function  list:		   Reentrancy.		 (line
       48)
       *   remove:				   remove.		 (line
       6)
       *  rename:				  rename.		 (line
       6)
       *   rewind:				   rewind.		 (line
       6)
       *  rindex:				  rindex.		 (line
       6)
       *   sbrk:				   Stubs.		 (line
       151)
       *  scanf:				  sscanf.		 (line
       6)
       *   seed48:				   rand48.		 (line
       6)
       *  setbuf:				  setbuf.		 (line
       6)
       *   setbuffer:				   setbuffer.		 (line
       6)
       *  setlinebuf:				  setlinebuf.		 (line
       6)
       *   setlocale:				   setlocale.		 (line
       6)
       *  setvbuf:				  setvbuf.		 (line
       6)
       *   signal:				   signal.		 (line
       6)
       *  siprintf:				  siprintf.		 (line
       6)
       *   siscanf:				   siscanf.		 (line
       6)
       *  sniprintf:				  siprintf.		 (line
       6)
       *   snprintf:				   sprintf.		 (line
       6)
       *  sprintf:				  sprintf.		 (line
       6)
       *   srand:				   rand.		 (line
       6)
       *  srand48:				  rand48.		 (line
       6)
       *   sscanf:				   sscanf.		 (line
       6)
       *  stat:					  Stubs.		 (line
       175)
       *   stpcpy:				   stpcpy.		 (line
       6)
       *  stpncpy:				  stpncpy.		 (line
       6)
       *   strcasecmp:				   strcasecmp.		 (line
       6)
       *  strcasestr:				  strcasestr.		 (line
       6)
       *   strcat:				   strcat.		 (line
       6)
       *  strchr:				  strchr.		 (line
       6)
       *   strcmp:				   strcmp.		 (line
       6)
       *  strcoll:				  strcoll.		 (line
       6)
       *   strcpy:				   strcpy.		 (line
       6)
       *  strcspn:				  strcspn.		 (line
       6)
       *   strerror:				   strerror.		 (line
       6)
       *  strerror_r:				  strerror_r.		 (line
       6)
       *   strftime:				   strftime.		 (line
       6)
       *  strlen:				  strlen.		 (line
       6)
       *   strlwr:				   strlwr.		 (line
       6)
       *  strncasecmp:				  strncasecmp.		 (line
       6)
       *   strncat:				   strncat.		 (line
       6)
       *  strncmp:				  strncmp.		 (line
       6)
       *   strncpy:				   strncpy.		 (line
       6)
       *  strnlen:				  strnlen.		 (line
       6)
       *   strpbrk:				   strpbrk.		 (line
       6)
       *  strrchr:				  strrchr.		 (line
       6)
       *   strsep:				   strtok.		 (line
       6)
       *  strspn:				  strspn.		 (line
       6)
       *   strstr:				   strstr.		 (line
       6)
       *  strtod:				  strtod.		 (line
       6)
       *   strtof:				   strtod.		 (line
       6)
       *  strtok:				  strtok.		 (line
       6)
       *   strtok_r:				   strtok.		 (line
       6)
       *  strtol:				  strtol.		 (line
       6)
       *   strtoll:				   strtoll.		 (line
       6)
       *  strtoul:				  strtoul.		 (line
       6)
       *   strtoull:				   strtoull.		 (line
       6)
       *  strupr:				  strupr.		 (line
       6)
       *   strxfrm:				   strxfrm.		 (line
       6)
       *  stubs:				  Stubs.		 (line
       6)
       *  subroutines  for  OS	interface:	    Stubs.		 (line
       6)
       *  swprintf:				  swprintf.		 (line
       6)
       *   swscanf:				   swscanf.		 (line
       6)
       *  system:				  system.		 (line
       6)
       *   tempnam:				   tmpnam.		 (line
       6)
       *  time:					  time.			 (line
       6)
       *   times:				   Stubs.		 (line
       183)
       *  tmpfile:				  tmpfile.		 (line
       6)
       *   tmpfile64:				   tmpfile64.		 (line
       6)
       *  tmpnam:				  tmpnam.		 (line
       6)
       *   toascii:				   toascii.		 (line
       6)
       *  tolower:				  tolower.		 (line
       6)
       *   toupper:				   toupper.		 (line
       6)
       *  towctrans:				  towctrans.		 (line
       6)
       *   towlower:				   towlower.		 (line
       6)
       *  towupper:				  towupper.		 (line
       6)
       *   tzset:				   tzset.		 (line
       6)
       *  unctrl:				  unctrl.		 (line
       6)
       *   unctrllen:				   unctrl.		 (line
       6)
       *  ungetc:				  ungetc.		 (line
       6)
       *   ungetwc:				   ungetwc.		 (line
       6)
       *  unlink:				  Stubs.		 (line
       190)
       *   va_alist:				   va_alist.		 (line
       6)
       *  va_arg  <1>:				   va_arg-trad.		 (line
       6)
       *   va_arg:				   va_arg.		 (line
       6)
       *  va_dcl:				  va_alist.		 (line
       6)
       *  va_end  <1>:				   va_end-trad.		 (line
       6)
       *  va_end:				  va_end.		 (line
       6)
       *  va_start  <1>:			   va_start-trad.	 (line
       6)
       *  va_start:				  va_start.		 (line
       6)
       *   vasiprintf:				   viprintf.		 (line
       6)
       *  vasniprintf:				  viprintf.		 (line
       6)
       *   vasnprintf:				   vfprintf.		 (line
       6)
       *  vasprintf:				  vfprintf.		 (line
       6)
       *   vdiprintf:				   diprintf.		 (line
       6)
       *  vdprintf:				  dprintf.		 (line
       6)
       *   vfiprintf:				   viprintf.		 (line
       6)
       *  vfiscanf:				  viscanf.		 (line
       6)
       *   vfprintf:				   vfprintf.		 (line
       6)
       *  vfscanf:				  vfscanf.		 (line
       6)
       *   vfwprintf:				   vfwprintf.		 (line
       6)
       *  vfwscanf:				  vfwscanf.		 (line
       6)
       *   viprintf:				   viprintf.		 (line
       6)
       *  viscanf:				  viscanf.		 (line
       6)
       *   vprintf:				   vfprintf.		 (line
       6)
       *  vscanf:				  vfscanf.		 (line
       6)
       *   vsiprintf:				   viprintf.		 (line
       6)
       *  vsiscanf:				  viscanf.		 (line
       6)
       *   vsniprintf:				   viprintf.		 (line
       6)
       *  vsnprintf:				  vfprintf.		 (line
       6)
       *   vsprintf:				   vfprintf.		 (line
       6)
       *  vsscanf:				  vfscanf.		 (line
       6)
       *   vswprintf:				   vfwprintf.		 (line
       6)
       *  vswscanf:				  vfwscanf.		 (line
       6)
       *   vwprintf:				   vfwprintf.		 (line
       6)
       *  vwscanf:				  vfwscanf.		 (line
       6)
       *   wait:				   Stubs.		 (line
       201)
       *  wcscasecmp:				  wcscasecmp.		 (line
       6)
       *   wcscat:				   wcscat.		 (line
       6)
       *  wcscoll:				  wcscoll.		 (line
       6)
       *   wcsdup:				   wcsdup.		 (line
       6)
       *  wcsftime:				  wcsftime.		 (line
       6)
       *   wcsncasecmp:				   wcsncasecmp.		 (line
       6)
       *  wcsnlen:				  wcsnlen.		 (line
       6)
       *   wcsnrtombs:				   wcsrtombs.		 (line
       6)
       *  wcsrtombs:				  wcsrtombs.		 (line
       6)
       *   wcstod:				   wcstod.		 (line
       6)
       *  wcstof:				  wcstod.		 (line
       6)
       *   wcstok:				   wcstok.		 (line
       6)
       *  wcstol:				  wcstol.		 (line
       6)
       *   wcstoll:				   wcstoll.		 (line
       6)
       *  wcstombs:				  wcstombs.		 (line
       6)
       *   wcstoul:				   wcstoul.		 (line
       6)
       *  wcstoull:				  wcstoull.		 (line
       6)
       *   wcswidth:				   wcswidth.		 (line
       6)
       *  wcsxfrm:				  wcsxfrm.		 (line
       6)
       *   wctomb:				   wctomb.		 (line
       6)
       *  wctrans:				  wctrans.		 (line
       6)
       *   wctype:				   wctype.		 (line
       6)
       *  wcwidth:				  wcwidth.		 (line
       6)
       *   wprintf:				   swprintf.		 (line
       6)
       *  write:				  Stubs.		 (line
       211)
       *   wscanf:				   swscanf.		 (line
       6)

SEE ALSO
       The full documentation for is maintained as a Texinfo manual.  If  info
       and are properly installed at your site, the command

	      info

       will give you access to the complete manual.

NEWLIB				  April 2010			       LIBC(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net