1 /* $Id: stdlib.h,v 1.4 2002/10/29 04:45:19 rex Exp $
6 * standard library definitions. Conforming to the Single UNIX(r)
7 * Specification Version 2, System Interface & Headers Issue 5
9 * This file is part of the ReactOS Operating System.
12 * Created by KJK::Hyperion <noog@libero.it>
14 * THIS SOFTWARE IS NOT COPYRIGHTED
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25 #ifndef __STDLIB_H_INCLUDED__
26 #define __STDLIB_H_INCLUDED__
37 typedef struct __tagdiv_t
39 int quot
; /* quotient */
40 int rem
; /* remainder */
43 typedef struct __tagldiv_t
45 long int quot
; /* quotient */
46 long int rem
; /* remainder */
50 #define EXIT_FAILURE (-1) /* Unsuccessful termination for exit(), evaluates \
51 to a non-zero value. */
52 #define EXIT_SUCCESS (0) /* Successful termination for exit(), evaluates to 0. */
55 #define RAND_MAX (32767) /* Maximum value returned by rand(), at least 32,767. */
58 #define MB_CUR_MAX (1) /* Integer expression whose value is the maximum number \
59 of bytes in a character specified by the current \
63 long a64l(const char *);
66 int atexit(void (*)(void));
67 double atof(const char *);
68 int atoi(const char *);
69 long int atol(const char *);
70 void *bsearch(const void *, const void *, size_t, size_t,
71 int (*)(const void *, const void *));
72 void *calloc(size_t, size_t);
75 char *ecvt(double, int, int *, int *);
76 double erand48(unsigned short int[3]);
78 char *fcvt (double, int, int *, int *);
80 char *gcvt(double, int, char *);
81 char *getenv(const char *);
82 int getsubopt(char **, char *const *, char **);
84 char *initstate(unsigned int, char *, size_t);
85 long int jrand48(unsigned short int[3]);
87 long int labs(long int);
88 void lcong48(unsigned short int[7]);
89 ldiv_t ldiv(long int, long int);
90 long int lrand48(void);
92 int mblen(const char *, size_t);
93 size_t mbstowcs(wchar_t *, const char *, size_t);
94 int mbtowc(wchar_t *, const char *, size_t);
97 long int mrand48(void);
98 long int nrand48(unsigned short int [3]);
101 void qsort(void *, size_t, size_t, int (*)(const void *,
104 int rand_r(unsigned int *);
106 void *realloc(void *, size_t);
107 char *realpath(const char *, char *);
108 unsigned short int seed48(unsigned short int[3]);
109 void setkey(const char *);
110 char *setstate(const char *);
111 void srand(unsigned int);
112 void srand48(long int);
113 void srandom(unsigned);
114 double strtod(const char *, char **);
115 long int strtol(const char *, char **, int);
117 strtoul(const char *, char **, int);
118 int system(const char *);
119 int ttyslot(void); /* LEGACY */
121 void *valloc(size_t); /* LEGACY */
122 size_t wcstombs(char *, const wchar_t *, size_t);
123 int wctomb(char *, wchar_t);
127 #endif /* __STDLIB_H_INCLUDED__ */