STDLIB.H(7) Miscellaneous Information Manual STDLIB.H(7)

stdlib.hstandard library definitions

#include <stdlib.h>

The < stdlib.h > header defines the following macro names:

Unsuccessful termination for exit(3) , evaluates to a non-zero value.
Successful termination for exit(3) , evaluates to 0.
Null pointer.
Maximum value returned by rand (), at least 32,767.
Integer expression whose value is the maximum number of bytes in a character specified by the current locale.

The following data types are defined through :

Structure type returned by div () function.
Structure type returned by ldiv () function.
As described in <stddef.h> .
As described in <stddef.h> .

In addition, the following symbolic names and macros are defined as in <sys/wait.h>, for use in decoding the return value from :

WNOHANG WUNTRACED WEXITSTATUS() WIFEXITED() WIFSIGNALED() WIFSTOPPED() WSTOPSIG() WTERMSIG()

The following are declared as functions and may also be defined as macros. Function prototypes must be provided for use with an ISO C compiler. long a64l(const char *); void abort(void); int abs(int); int atexit(void (*)(void)); double atof(const char *); int atoi(const char *); long int atol(const char *); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); void *calloc(size_t, size_t); div_t div(int, int); double drand48(void); char *ecvt(double, int, int *, int *); double erand48(unsigned short int[3]); void exit(int); char *fcvt (double, int, int *, int *); void free(void *); char *gcvt(double, int, char *); char *getenv(const char *); int getsubopt(char **, char *const *, char **); int grantpt(int); char *initstate(unsigned int, char *, size_t); long int jrand48(unsigned short int[3]); char *l64a(long); long int labs(long int); void lcong48(unsigned short int[7]); ldiv_t ldiv(long int, long int); long int lrand48(void); void *malloc(size_t); int mblen(const char *, size_t); size_t mbstowcs(wchar_t *, const char *, size_t); int mbtowc(wchar_t *, const char *, size_t); char *mktemp(char *); int mkstemp(char *); long int mrand48(void); long int nrand48(unsigned short int [3]); char *ptsname(int); int putenv(char *); void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); int rand(void); int rand_r(unsigned int *); long random(void); void *realloc(void *, size_t); char *realpath(const char *, char *); unsigned short int seed48(unsigned short int[3]); void setkey(const char *); char *setstate(const char *); void srand(unsigned int); void srand48(long int); void srandom(unsigned); double strtod(const char *, char **); long int strtol(const char *, char **, int); unsigned long int strtoul(const char *, char **, int); int system(const char *); int ttyslot(void); (LEGACY) int unlockpt(int); void *valloc(size_t); (LEGACY) size_t wcstombs(char *, const wchar_t *, size_t); int wctomb(char *, wchar_t);

Inclusion of the <stdlib.h> header may also make visible all symbols from <stddef.h>, <limits.h>, <math.h> and <sys/wait.h>.

None.

None.

a64l(3) , abort(3) , abs(3) , atexit(3) , atof(3) , atoi(3) , atol(3) , bsearch(3) , calloc(3) , div(3) , drand48(3) , ecvt(3) , erand48(3) , exit(3) , fcvt(3) , free(3) , gcvt(3) , getenv(3) , getsubopt(3) , grantpt(3) , initstate(3) , jrand48(3) , l64a(3) , labs(3) , lcong48(3) , ldiv(3) , lrand48(3) , malloc(3) , mblen(3) , mbstowcs(3) , mbtowc(3) , mktemp(3) , mkstemp(3) , mrand48(3) , nrand48(3) , ptsname(3) , putenv(3) , qsort(3) , rand(3) , rand(3) , realloc(3) , realpath(3) , setstate(3) , srand(3) , srand48(3) , srandom(3) , strtod(3) , strtol(3) , strtoul(3) , unlockpt(3) , wcstombs(3) , wctomb(3) , <sys/types.h> .

February 1997 posix.fail