xref: /netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/include/c_compatibility/stdint.h (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
136ac495dSmrg // -*- C++ -*- compatibility header.
236ac495dSmrg 
3*8feb0f0bSmrg // Copyright (C) 2007-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 stdint.h
2636ac495dSmrg  *  This is a Standard C++ Library header.
2736ac495dSmrg  */
2836ac495dSmrg 
2936ac495dSmrg #ifndef _GLIBCXX_STDINT_H
3036ac495dSmrg #define _GLIBCXX_STDINT_H 1
3136ac495dSmrg 
3236ac495dSmrg #pragma GCC system_header
3336ac495dSmrg 
3436ac495dSmrg #include <bits/c++config.h>
3536ac495dSmrg 
3636ac495dSmrg #if __cplusplus >= 201103L
3736ac495dSmrg 
3836ac495dSmrg // For 8.22.1/1 (see C99, Notes 219, 220, 222)
3936ac495dSmrg # if _GLIBCXX_HAVE_STDINT_H
4036ac495dSmrg #  ifndef __STDC_LIMIT_MACROS
4136ac495dSmrg #   define _UNDEF__STDC_LIMIT_MACROS
4236ac495dSmrg #   define __STDC_LIMIT_MACROS
4336ac495dSmrg #  endif
4436ac495dSmrg #  ifndef __STDC_CONSTANT_MACROS
4536ac495dSmrg #   define _UNDEF__STDC_CONSTANT_MACROS
4636ac495dSmrg #   define __STDC_CONSTANT_MACROS
4736ac495dSmrg #  endif
4836ac495dSmrg #  include_next <stdint.h>
4936ac495dSmrg #  ifdef _UNDEF__STDC_LIMIT_MACROS
5036ac495dSmrg #   undef __STDC_LIMIT_MACROS
5136ac495dSmrg #   undef _UNDEF__STDC_LIMIT_MACROS
5236ac495dSmrg #  endif
5336ac495dSmrg #  ifdef _UNDEF__STDC_CONSTANT_MACROS
5436ac495dSmrg #   undef __STDC_CONSTANT_MACROS
5536ac495dSmrg #   undef _UNDEF__STDC_CONSTANT_MACROS
5636ac495dSmrg #  endif
5736ac495dSmrg # endif
5836ac495dSmrg 
5936ac495dSmrg #ifdef _GLIBCXX_USE_C99_STDINT_TR1
6036ac495dSmrg 
6136ac495dSmrg namespace std
6236ac495dSmrg {
6336ac495dSmrg   using ::int8_t;
6436ac495dSmrg   using ::int16_t;
6536ac495dSmrg   using ::int32_t;
6636ac495dSmrg   using ::int64_t;
6736ac495dSmrg 
6836ac495dSmrg   using ::int_fast8_t;
6936ac495dSmrg   using ::int_fast16_t;
7036ac495dSmrg   using ::int_fast32_t;
7136ac495dSmrg   using ::int_fast64_t;
7236ac495dSmrg 
7336ac495dSmrg   using ::int_least8_t;
7436ac495dSmrg   using ::int_least16_t;
7536ac495dSmrg   using ::int_least32_t;
7636ac495dSmrg   using ::int_least64_t;
7736ac495dSmrg 
7836ac495dSmrg   using ::intmax_t;
7936ac495dSmrg   using ::intptr_t;
8036ac495dSmrg 
8136ac495dSmrg   using ::uint8_t;
8236ac495dSmrg   using ::uint16_t;
8336ac495dSmrg   using ::uint32_t;
8436ac495dSmrg   using ::uint64_t;
8536ac495dSmrg 
8636ac495dSmrg   using ::uint_fast8_t;
8736ac495dSmrg   using ::uint_fast16_t;
8836ac495dSmrg   using ::uint_fast32_t;
8936ac495dSmrg   using ::uint_fast64_t;
9036ac495dSmrg 
9136ac495dSmrg   using ::uint_least8_t;
9236ac495dSmrg   using ::uint_least16_t;
9336ac495dSmrg   using ::uint_least32_t;
9436ac495dSmrg   using ::uint_least64_t;
9536ac495dSmrg 
9636ac495dSmrg   using ::uintmax_t;
9736ac495dSmrg   using ::uintptr_t;
9836ac495dSmrg } // namespace
9936ac495dSmrg 
10036ac495dSmrg #endif // _GLIBCXX_USE_C99_STDINT_TR1
10136ac495dSmrg 
10236ac495dSmrg #else
10336ac495dSmrg 
10436ac495dSmrg # if _GLIBCXX_HAVE_STDINT_H
10536ac495dSmrg #  include_next <stdint.h>
10636ac495dSmrg # endif
10736ac495dSmrg 
10836ac495dSmrg #endif // C++11
10936ac495dSmrg 
11036ac495dSmrg #endif // _GLIBCXX_STDINT_H
111