stdlib.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #ifndef _STDLIB_H
  2. #define _STDLIB_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #undef NULL
  7. #ifdef __cplusplus
  8. #define NULL 0
  9. #else
  10. #define NULL ((void*)0)
  11. #endif
  12. #define __NEED_size_t
  13. #define __NEED_wchar_t
  14. #include <bits/alltypes.h>
  15. int atoi (const char *);
  16. long atol (const char *);
  17. long long atoll (const char *);
  18. double atof (const char *);
  19. float strtof (const char *, char **);
  20. double strtod (const char *, char **);
  21. long double strtold (const char *, char **);
  22. long strtol (const char *, char **, int);
  23. unsigned long strtoul (const char *, char **, int);
  24. long long strtoll (const char *, char **, int);
  25. unsigned long long strtoull (const char *, char **, int);
  26. char *l64a (long);
  27. long a64l (const char *);
  28. long int random (void);
  29. void srandom (unsigned int);
  30. char *initstate (unsigned int, char *, size_t);
  31. char *setstate (char *);
  32. int rand (void);
  33. void srand (unsigned);
  34. int rand_r (unsigned *);
  35. double drand48 (void);
  36. double erand48 (unsigned short [3]);
  37. long int lrand48 (void);
  38. long int nrand48 (unsigned short [3]);
  39. long mrand48 (void);
  40. long jrand48 (unsigned short [3]);
  41. void srand48 (long);
  42. unsigned short *seed48 (unsigned short [3]);
  43. void lcong48 (unsigned short [7]);
  44. void *malloc (size_t);
  45. void *calloc (size_t, size_t);
  46. void *realloc (void *, size_t);
  47. void free (void *);
  48. void *valloc (size_t);
  49. int posix_memalign (void **, size_t, size_t);
  50. void abort (void);
  51. int atexit (void (*) (void));
  52. void exit (int);
  53. void _Exit (int);
  54. char *getenv (const char *);
  55. int putenv (char *);
  56. int setenv (const char *, const char *, int);
  57. int unsetenv (const char *);
  58. char *mktemp (char *);
  59. int mkstemp (char *);
  60. int system (const char *);
  61. char *realpath (const char *, char *);
  62. void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
  63. void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
  64. int abs (int);
  65. long labs (long);
  66. long long llabs (long long);
  67. typedef struct { int quot, rem; } div_t;
  68. extern div_t div (int, int);
  69. typedef struct { long quot, rem; } ldiv_t;
  70. ldiv_t ldiv (long, long);
  71. typedef struct { long long quot, rem; } lldiv_t;
  72. lldiv_t lldiv (long long, long long);
  73. int mblen (const char *, size_t);
  74. int mbtowc (wchar_t *, const char *, size_t);
  75. int wctomb (char *, wchar_t);
  76. size_t mbstowcs (wchar_t *, const char *, size_t);
  77. size_t wcstombs (char *, const wchar_t *, size_t);
  78. int getsubopt (char **, char *const *, char **);
  79. void setkey (const char *);
  80. int posix_openpt (int);
  81. int grantpt (int);
  82. int unlockpt (int);
  83. char *ptsname (int);
  84. #define MB_CUR_MAX 4
  85. #define RAND_MAX (0x7fffffff)
  86. #define EXIT_FAILURE 1
  87. #define EXIT_SUCCESS 0
  88. #include <bits/wexitstatus.h>
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif