logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

stdlib.h.0p (7656B)


  1. '\" et
  2. .TH stdlib.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. stdlib.h
  12. \(em standard library definitions
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdlib.h>
  17. .fi
  18. .SH DESCRIPTION
  19. Some of the functionality described on this reference page extends the
  20. ISO\ C standard. Applications shall define the appropriate feature test macro
  21. (see the System Interfaces volume of POSIX.1\(hy2017,
  22. .IR "Section 2.2" ", " "The Compilation Environment")
  23. to enable the visibility of these symbols in this header.
  24. .P
  25. The
  26. .IR <stdlib.h>
  27. header shall define the following macros which shall expand to
  28. integer constant expressions:
  29. .IP EXIT_FAILURE 12
  30. Unsuccessful termination for
  31. \fIexit\fR();
  32. evaluates to a non-zero value.
  33. .IP EXIT_SUCCESS 12
  34. Successful termination for
  35. \fIexit\fR();
  36. evaluates to 0.
  37. .IP {RAND_MAX} 12
  38. Maximum value returned by
  39. \fIrand\fR();
  40. at least 32\|767.
  41. .P
  42. The
  43. .IR <stdlib.h>
  44. header shall define the following macro which shall expand to a
  45. positive integer expression with type
  46. .BR size_t :
  47. .IP {MB_CUR_MAX} 12
  48. Maximum number of bytes in a character specified by the current
  49. locale (category
  50. .IR LC_CTYPE ).
  51. .P
  52. In the POSIX locale the value of
  53. {MB_CUR_MAX}
  54. shall be 1.
  55. .P
  56. The
  57. .IR <stdlib.h>
  58. header shall define NULL as described in
  59. .IR <stddef.h> .
  60. .P
  61. The
  62. .IR <stdlib.h>
  63. header shall define the following data types through
  64. .BR typedef :
  65. .IP "\fBdiv_t\fP" 12
  66. Structure type returned by the
  67. \fIdiv\fR()
  68. function.
  69. .IP "\fBldiv_t\fP" 12
  70. Structure type returned by the
  71. \fIldiv\fR()
  72. function.
  73. .IP "\fBlldiv_t\fP" 12
  74. Structure type returned by the
  75. \fIlldiv\fR()
  76. function.
  77. .IP "\fBsize_t\fP" 12
  78. As described in
  79. .IR <stddef.h> .
  80. .IP "\fBwchar_t\fP" 12
  81. As described in
  82. .IR <stddef.h> .
  83. .P
  84. In addition, the
  85. .IR <stdlib.h>
  86. header shall define the following symbolic constants and macros
  87. as described in
  88. .IR <sys/wait.h> :
  89. .P
  90. .nf
  91. WEXITSTATUS
  92. WIFEXITED
  93. WIFSIGNALED
  94. WIFSTOPPED
  95. WNOHANG
  96. WSTOPSIG
  97. WTERMSIG
  98. WUNTRACED
  99. .fi
  100. .P
  101. The following shall be declared as functions and may also be defined as
  102. macros. Function prototypes shall be provided.
  103. .sp
  104. .RS 4
  105. .nf
  106. void _Exit(int);
  107. long a64l(const char *);
  108. void abort(void);
  109. int abs(int);
  110. int atexit(void (*)(void));
  111. double atof(const char *);
  112. int atoi(const char *);
  113. long atol(const char *);
  114. long long atoll(const char *);
  115. void *bsearch(const void *, const void *, size_t, size_t,
  116. int (*)(const void *, const void *));
  117. void *calloc(size_t, size_t);
  118. div_t div(int, int);
  119. double drand48(void);
  120. double erand48(unsigned short [3]);
  121. void exit(int);
  122. void free(void *);
  123. char *getenv(const char *);
  124. int getsubopt(char **, char *const *, char **);
  125. int grantpt(int);
  126. char *initstate(unsigned, char *, size_t);
  127. long jrand48(unsigned short [3]);
  128. char *l64a(long);
  129. long labs(long);
  130. void lcong48(unsigned short [7]);
  131. ldiv_t ldiv(long, long);
  132. long long llabs(long long);
  133. lldiv_t lldiv(long long, long long);
  134. long lrand48(void);
  135. void *malloc(size_t);
  136. int mblen(const char *, size_t);
  137. size_t mbstowcs(wchar_t *restrict, const char *restrict, size_t);
  138. int mbtowc(wchar_t *restrict, const char *restrict, size_t);
  139. char *mkdtemp(char *);
  140. int mkstemp(char *);
  141. long mrand48(void);
  142. long nrand48(unsigned short [3]);
  143. int posix_memalign(void **, size_t, size_t);
  144. int posix_openpt(int);
  145. char *ptsname(int);
  146. int putenv(char *);
  147. void qsort(void *, size_t, size_t, int (*)(const void *,
  148. const void *));
  149. int rand(void);
  150. int rand_r(unsigned *);
  151. long random(void);
  152. void *realloc(void *, size_t);
  153. char *realpath(const char *restrict, char *restrict);
  154. unsigned short *seed48(unsigned short [3]);
  155. int setenv(const char *, const char *, int);
  156. void setkey(const char *);
  157. char *setstate(char *);
  158. void srand(unsigned);
  159. void srand48(long);
  160. void srandom(unsigned);
  161. double strtod(const char *restrict, char **restrict);
  162. float strtof(const char *restrict, char **restrict);
  163. long strtol(const char *restrict, char **restrict, int);
  164. long double strtold(const char *restrict, char **restrict);
  165. long long strtoll(const char *restrict, char **restrict, int);
  166. unsigned long strtoul(const char *restrict, char **restrict, int);
  167. unsigned long long
  168. strtoull(const char *restrict, char **restrict, int);
  169. int system(const char *);
  170. int unlockpt(int);
  171. int unsetenv(const char *);
  172. size_t wcstombs(char *restrict, const wchar_t *restrict, size_t);
  173. int wctomb(char *, wchar_t);
  174. .fi
  175. .P
  176. .RE
  177. .P
  178. Inclusion of the
  179. .IR <stdlib.h>
  180. header may also make visible all symbols from
  181. .IR <stddef.h> ,
  182. .IR <limits.h> ,
  183. .IR <math.h> ,
  184. and
  185. .IR <sys/wait.h> .
  186. .LP
  187. .IR "The following sections are informative."
  188. .SH "APPLICATION USAGE"
  189. None.
  190. .SH RATIONALE
  191. None.
  192. .SH "FUTURE DIRECTIONS"
  193. None.
  194. .SH "SEE ALSO"
  195. .IR "\fB<limits.h>\fP",
  196. .IR "\fB<math.h>\fP",
  197. .IR "\fB<stddef.h>\fP",
  198. .IR "\fB<sys_types.h>\fP",
  199. .IR "\fB<sys_wait.h>\fP"
  200. .P
  201. .ad l
  202. The System Interfaces volume of POSIX.1\(hy2017,
  203. .IR "Section 2.2" ", " "The Compilation Environment",
  204. .IR "\fI_Exit\fR\^(\|)",
  205. .IR "\fIa64l\fR\^(\|)",
  206. .IR "\fIabort\fR\^(\|)",
  207. .IR "\fIabs\fR\^(\|)",
  208. .IR "\fIatexit\fR\^(\|)",
  209. .IR "\fIatof\fR\^(\|)",
  210. .IR "\fIatoi\fR\^(\|)",
  211. .IR "\fIatol\fR\^(\|)",
  212. .IR "\fIbsearch\fR\^(\|)",
  213. .IR "\fIcalloc\fR\^(\|)",
  214. .IR "\fIdiv\fR\^(\|)",
  215. .IR "\fIdrand48\fR\^(\|)",
  216. .IR "\fIexit\fR\^(\|)",
  217. .IR "\fIfree\fR\^(\|)",
  218. .IR "\fIgetenv\fR\^(\|)",
  219. .IR "\fIgetsubopt\fR\^(\|)",
  220. .IR "\fIgrantpt\fR\^(\|)",
  221. .IR "\fIinitstate\fR\^(\|)",
  222. .IR "\fIlabs\fR\^(\|)",
  223. .IR "\fIldiv\fR\^(\|)",
  224. .IR "\fImalloc\fR\^(\|)",
  225. .IR "\fImblen\fR\^(\|)",
  226. .IR "\fImbstowcs\fR\^(\|)",
  227. .IR "\fImbtowc\fR\^(\|)",
  228. .IR "\fImkdtemp\fR\^(\|)",
  229. .IR "\fIposix_memalign\fR\^(\|)",
  230. .IR "\fIposix_openpt\fR\^(\|)",
  231. .IR "\fIptsname\fR\^(\|)",
  232. .IR "\fIputenv\fR\^(\|)",
  233. .IR "\fIqsort\fR\^(\|)",
  234. .IR "\fIrand\fR\^(\|)",
  235. .IR "\fIrealloc\fR\^(\|)",
  236. .IR "\fIrealpath\fR\^(\|)",
  237. .IR "\fIsetenv\fR\^(\|)",
  238. .IR "\fIsetkey\fR\^(\|)",
  239. .IR "\fIstrtod\fR\^(\|)",
  240. .IR "\fIstrtol\fR\^(\|)",
  241. .IR "\fIstrtoul\fR\^(\|)",
  242. .IR "\fIsystem\fR\^(\|)",
  243. .IR "\fIunlockpt\fR\^(\|)",
  244. .IR "\fIunsetenv\fR\^(\|)",
  245. .IR "\fIwcstombs\fR\^(\|)",
  246. .IR "\fIwctomb\fR\^(\|)"
  247. .ad b
  248. .\"
  249. .SH COPYRIGHT
  250. Portions of this text are reprinted and reproduced in electronic form
  251. from IEEE Std 1003.1-2017, Standard for Information Technology
  252. -- Portable Operating System Interface (POSIX), The Open Group Base
  253. Specifications Issue 7, 2018 Edition,
  254. Copyright (C) 2018 by the Institute of
  255. Electrical and Electronics Engineers, Inc and The Open Group.
  256. In the event of any discrepancy between this version and the original IEEE and
  257. The Open Group Standard, the original IEEE and The Open Group Standard
  258. is the referee document. The original Standard can be obtained online at
  259. http://www.opengroup.org/unix/online.html .
  260. .PP
  261. Any typographical or formatting errors that appear
  262. in this page are most likely
  263. to have been introduced during the conversion of the source files to
  264. man page format. To report such errors, see
  265. https://www.kernel.org/doc/man-pages/reporting_bugs.html .