stdlib.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // -*- C++ -*- compatibility header.
  2. // Copyright (C) 2002-2019 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. #endif
  40. #if _GLIBCXX_HOSTED
  41. using std::div_t;
  42. using std::ldiv_t;
  43. using std::abs;
  44. using std::atof;
  45. using std::atoi;
  46. using std::atol;
  47. using std::bsearch;
  48. using std::calloc;
  49. using std::div;
  50. using std::free;
  51. using std::getenv;
  52. using std::labs;
  53. using std::ldiv;
  54. using std::malloc;
  55. #ifdef _GLIBCXX_HAVE_MBSTATE_T
  56. using std::mblen;
  57. using std::mbstowcs;
  58. using std::mbtowc;
  59. #endif // _GLIBCXX_HAVE_MBSTATE_T
  60. using std::qsort;
  61. using std::rand;
  62. using std::realloc;
  63. using std::srand;
  64. using std::strtod;
  65. using std::strtol;
  66. using std::strtoul;
  67. using std::system;
  68. #ifdef _GLIBCXX_USE_WCHAR_T
  69. using std::wcstombs;
  70. using std::wctomb;
  71. #endif // _GLIBCXX_USE_WCHAR_T
  72. #endif
  73. #endif // _GLIBCXX_STDLIB_H
  74. #endif // __cplusplus