xref: /netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/include/c_compatibility/stdlib.h (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
136ac495dSmrg // -*- C++ -*- compatibility header.
236ac495dSmrg 
3*8feb0f0bSmrg // Copyright (C) 2002-2020 Free Software Foundation, Inc.
436ac495dSmrg //
536ac495dSmrg // This file is part of the GNU ISO C++ Library.  This library is free
636ac495dSmrg // software; you can redistribute it and/or modify it under the
736ac495dSmrg // terms of the GNU General Public License as published by the
836ac495dSmrg // Free Software Foundation; either version 3, or (at your option)
936ac495dSmrg // any later version.
1036ac495dSmrg 
1136ac495dSmrg // This library is distributed in the hope that it will be useful,
1236ac495dSmrg // but WITHOUT ANY WARRANTY; without even the implied warranty of
1336ac495dSmrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1436ac495dSmrg // GNU General Public License for more details.
1536ac495dSmrg 
1636ac495dSmrg // Under Section 7 of GPL version 3, you are granted additional
1736ac495dSmrg // permissions described in the GCC Runtime Library Exception, version
1836ac495dSmrg // 3.1, as published by the Free Software Foundation.
1936ac495dSmrg 
2036ac495dSmrg // You should have received a copy of the GNU General Public License and
2136ac495dSmrg // a copy of the GCC Runtime Library Exception along with this program;
2236ac495dSmrg // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
2336ac495dSmrg // <http://www.gnu.org/licenses/>.
2436ac495dSmrg 
2536ac495dSmrg /** @file stdlib.h
2636ac495dSmrg  *  This is a Standard C++ Library header.
2736ac495dSmrg  */
2836ac495dSmrg 
2936ac495dSmrg #if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
3036ac495dSmrg # include_next <stdlib.h>
3136ac495dSmrg #else
3236ac495dSmrg 
3336ac495dSmrg #ifndef _GLIBCXX_STDLIB_H
3436ac495dSmrg #define _GLIBCXX_STDLIB_H 1
3536ac495dSmrg 
3636ac495dSmrg # include <cstdlib>
3736ac495dSmrg 
3836ac495dSmrg using std::abort;
3936ac495dSmrg using std::atexit;
4036ac495dSmrg using std::exit;
4136ac495dSmrg #if __cplusplus >= 201103L
4236ac495dSmrg # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
4336ac495dSmrg   using std::at_quick_exit;
4436ac495dSmrg # endif
4536ac495dSmrg # ifdef _GLIBCXX_HAVE_QUICK_EXIT
4636ac495dSmrg   using std::quick_exit;
4736ac495dSmrg # endif
4836ac495dSmrg #endif
4936ac495dSmrg 
5036ac495dSmrg #if _GLIBCXX_HOSTED
5136ac495dSmrg using std::div_t;
5236ac495dSmrg using std::ldiv_t;
5336ac495dSmrg 
5436ac495dSmrg using std::abs;
5536ac495dSmrg using std::atof;
5636ac495dSmrg using std::atoi;
5736ac495dSmrg using std::atol;
5836ac495dSmrg using std::bsearch;
5936ac495dSmrg using std::calloc;
6036ac495dSmrg using std::div;
6136ac495dSmrg using std::free;
6236ac495dSmrg using std::getenv;
6336ac495dSmrg using std::labs;
6436ac495dSmrg using std::ldiv;
6536ac495dSmrg using std::malloc;
6636ac495dSmrg #ifdef _GLIBCXX_HAVE_MBSTATE_T
6736ac495dSmrg using std::mblen;
6836ac495dSmrg using std::mbstowcs;
6936ac495dSmrg using std::mbtowc;
7036ac495dSmrg #endif // _GLIBCXX_HAVE_MBSTATE_T
7136ac495dSmrg using std::qsort;
7236ac495dSmrg using std::rand;
7336ac495dSmrg using std::realloc;
7436ac495dSmrg using std::srand;
7536ac495dSmrg using std::strtod;
7636ac495dSmrg using std::strtol;
7736ac495dSmrg using std::strtoul;
7836ac495dSmrg using std::system;
7936ac495dSmrg #ifdef _GLIBCXX_USE_WCHAR_T
8036ac495dSmrg using std::wcstombs;
8136ac495dSmrg using std::wctomb;
8236ac495dSmrg #endif // _GLIBCXX_USE_WCHAR_T
8336ac495dSmrg #endif
8436ac495dSmrg 
8536ac495dSmrg #endif // _GLIBCXX_STDLIB_H
8636ac495dSmrg #endif // __cplusplus
87