00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _STDLIB_H_
00040 #define _STDLIB_H_
00041
00042
00043 #ifdef __cplusplus
00044 #include <e32def.h>
00045
00046 extern "C" {
00047 #endif
00048
00049
00050 #include <sys/cdefs.h>
00051 #include <sys/_null.h>
00052 #include <sys/_types.h>
00053
00054 #include <_ansi.h>
00055
00056 #if __BSD_VISIBLE
00057 #ifndef _RUNE_T_DECLARED
00058 typedef __rune_t rune_t;
00059 #define _RUNE_T_DECLARED
00060 #endif
00061 #endif
00062
00063 #ifndef _SIZE_T_DECLARED
00064 typedef __size_t size_t;
00065 #define _SIZE_T_DECLARED
00066 #endif
00067
00068 #ifndef __SYMBIAN32__
00069 #ifndef __cplusplus
00070 #ifndef _WCHAR_T_DECLARED
00071 typedef __wchar_t wchar_t;
00072 #define _WCHAR_T_DECLARED
00073
00074 #endif
00075
00076 #endif
00077 #else
00078 #if !defined _WCHAR_T_DECLARED && !defined __wchar_t_defined
00079 typedef unsigned short int wchar_t;
00080 #define _WCHAR_T_DECLARED
00081
00082 #endif
00083
00084 #endif
00085
00086 typedef struct {
00087 int quot;
00088 int rem;
00089 } div_t;
00090
00091 typedef struct {
00092 long quot;
00093 long rem;
00094 } ldiv_t;
00095
00096 #define EXIT_FAILURE 1
00097 #define EXIT_SUCCESS 0
00098
00099 #define RAND_MAX 0x7fffffff
00100
00101 #ifndef __SYMBIAN32__
00102 extern int __mb_cur_max;
00103 #define MB_CUR_MAX __mb_cur_max
00104 #else
00105 #define MB_CUR_MAX 4
00106 #endif
00107
00108
00109 #define inline __inline
00110
00111 __BEGIN_DECLS
00112 IMPORT_C void abort(void) __dead2;
00113 IMPORT_C int abs(int) __pure2;
00114 IMPORT_C int atexit(void (*)(void));
00115 IMPORT_C double atof(const char *);
00116 IMPORT_C int atoi(const char *);
00117 IMPORT_C long atol(const char *);
00118 IMPORT_C void *bsearch(const void *, const void *, size_t,
00119 size_t, int (*)(const void *, const void *));
00120 IMPORT_C void *calloc(size_t, size_t);
00121 IMPORT_C div_t div(int, int) __pure2;
00122 IMPORT_C void exit(int) __dead2;
00123 IMPORT_C void free(void *);
00124 IMPORT_C char *getenv(const char *);
00125 IMPORT_C long labs(long) __pure2;
00126 IMPORT_C ldiv_t ldiv(long, long) __pure2;
00127 IMPORT_C void *malloc(size_t);
00128 IMPORT_C int mblen(const char *, size_t);
00129 IMPORT_C size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
00130 IMPORT_C int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
00131 IMPORT_C void qsort(void *, size_t, size_t,
00132 int (*)(const void *, const void *));
00133 IMPORT_C int rand(void);
00134 IMPORT_C void *realloc(void *, size_t);
00135 IMPORT_C void srand(unsigned);
00136 IMPORT_C double strtod(const char * __restrict, char ** __restrict);
00137
00138 IMPORT_C
00139 float strtof(const char * __restrict, char ** __restrict);
00140
00141 IMPORT_C long strtol(const char * __restrict, char ** __restrict, int);
00142
00143 IMPORT_C
00144 long double
00145 strtold(const char * __restrict, char ** __restrict);
00146
00147 IMPORT_C
00148 unsigned long
00149 strtoul(const char * __restrict, char ** __restrict, int);
00150
00151 IMPORT_C int system(const char *);
00152 IMPORT_C int wctomb(char *, wchar_t);
00153 IMPORT_C size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165 #if __ISO_C_VISIBLE >= 1999
00166 #ifdef __LONG_LONG_SUPPORTED
00167
00168 typedef struct {
00169 long long quot;
00170 long long rem;
00171 } lldiv_t;
00172
00173
00174 IMPORT_C
00175 long long
00176 atoll(const char *);
00177
00178
00179 IMPORT_C
00180 long long
00181 llabs(long long) __pure2;
00182
00183
00184 IMPORT_C lldiv_t lldiv(long long, long long) __pure2;
00185
00186
00187 IMPORT_C
00188 long long
00189 strtoll(const char * __restrict, char ** __restrict, int);
00190
00191
00192 IMPORT_C
00193 unsigned long long
00194 strtoull(const char * __restrict, char ** __restrict, int);
00195 #endif
00196
00197 IMPORT_C void _Exit(int) __dead2;
00198 #endif
00199
00200
00201
00202
00203
00204
00205 #if __POSIX_VISIBLE
00206 IMPORT_C int setenv(const char *, const char *, int);
00207 IMPORT_C void unsetenv(const char *);
00208 #endif
00209
00210
00211
00212
00213
00214
00215
00216 #if __XSI_VISIBLE
00217
00218
00219 #ifndef _MKSTEMP_DECLARED
00220 IMPORT_C int mkstemp(char *);
00221 #define _MKSTEMP_DECLARED
00222 #endif
00223 IMPORT_C int putenv(const char *);
00224 IMPORT_C long random(void);
00225 IMPORT_C void srandom(unsigned long);
00226 IMPORT_C char *realpath(const char *, char resolved_path[]);
00227 IMPORT_C char *setstate( char *);
00228 IMPORT_C char *initstate(unsigned long , char *, long);
00229 #ifndef _SETKEY_DECLARED
00230 int setkey(const char *);
00231 #define _SETKEY_DECLARED
00232 #endif
00233 #endif
00234
00235 #if __BSD_VISIBLE
00236 extern const char *_malloc_options;
00237 extern void (*_malloc_message)(const char *, const char *, const char *,
00238 const char *);
00239
00240
00241 __uint32_t
00242 arc4random(void);
00243 IMPORT_C const char * getprogname(void);
00244 IMPORT_C void *reallocf(void *, size_t);
00245 IMPORT_C void setprogname(const char *);
00246
00247
00248 IMPORT_C
00249 __int64_t
00250 strtoq(const char *, char **, int);
00251 IMPORT_C
00252 __uint64_t
00253 strtouq(const char *, char **, int);
00254
00255 extern char *suboptarg;
00256 #endif
00257
00258 #ifdef __SYMBIAN32__
00259 #ifndef _SETKEY_DECLARED
00260 void setkey(const char *key);
00261 #endif
00262 #endif
00263 __END_DECLS
00264
00265
00266 #ifdef __cplusplus
00267 }
00268 #endif
00269
00270
00271 #endif