stdlib.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // -*- C++ -*- compatibility header.
  2. // Copyright (C) 2002-2023 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file stdlib.h
  21. * This is a Standard C++ Library header.
  22. */
  23. #if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
  24. # include_next <stdlib.h>
  25. #else
  26. #ifndef _GLIBCXX_STDLIB_H
  27. #define _GLIBCXX_STDLIB_H 1
  28. # include <cstdlib>
  29. using std::abort;
  30. using std::atexit;
  31. using std::exit;
  32. #if __cplusplus >= 201103L
  33. # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
  34. using std::at_quick_exit;
  35. # endif
  36. # ifdef _GLIBCXX_HAVE_QUICK_EXIT
  37. using std::quick_exit;
  38. # endif
  39. # if _GLIBCXX_USE_C99_STDLIB
  40. using std::_Exit;
  41. # endif
  42. #endif
  43. #if _GLIBCXX_HOSTED
  44. using std::div_t;
  45. using std::ldiv_t;
  46. using std::abs;
  47. using std::atof;
  48. using std::atoi;
  49. using std::atol;
  50. using std::bsearch;
  51. using std::calloc;
  52. using std::div;
  53. using std::free;
  54. using std::getenv;
  55. using std::labs;
  56. using std::ldiv;
  57. using std::malloc;
  58. #ifdef _GLIBCXX_HAVE_MBSTATE_T
  59. using std::mblen;
  60. using std::mbstowcs;
  61. using std::mbtowc;
  62. #endif // _GLIBCXX_HAVE_MBSTATE_T
  63. using std::qsort;
  64. using std::rand;
  65. using std::realloc;
  66. using std::srand;
  67. using std::strtod;
  68. using std::strtol;
  69. using std::strtoul;
  70. using std::system;
  71. #ifdef _GLIBCXX_USE_WCHAR_T
  72. using std::wcstombs;
  73. using std::wctomb;
  74. #endif // _GLIBCXX_USE_WCHAR_T
  75. #endif
  76. #endif // _GLIBCXX_STDLIB_H
  77. #endif // __cplusplus