xref: /netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/c_compatibility/stdint.h (revision b1e838363e3c6fc78a55519254d99869742dd33c)
14fee23f9Smrg // -*- C++ -*- compatibility header.
24fee23f9Smrg 
3*b1e83836Smrg // Copyright (C) 2007-2022 Free Software Foundation, Inc.
44fee23f9Smrg //
54fee23f9Smrg // This file is part of the GNU ISO C++ Library.  This library is free
64fee23f9Smrg // software; you can redistribute it and/or modify it under the
74fee23f9Smrg // terms of the GNU General Public License as published by the
84fee23f9Smrg // Free Software Foundation; either version 3, or (at your option)
94fee23f9Smrg // any later version.
104fee23f9Smrg 
114fee23f9Smrg // This library is distributed in the hope that it will be useful,
124fee23f9Smrg // but WITHOUT ANY WARRANTY; without even the implied warranty of
134fee23f9Smrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
144fee23f9Smrg // GNU General Public License for more details.
154fee23f9Smrg 
164fee23f9Smrg // Under Section 7 of GPL version 3, you are granted additional
174fee23f9Smrg // permissions described in the GCC Runtime Library Exception, version
184fee23f9Smrg // 3.1, as published by the Free Software Foundation.
194fee23f9Smrg 
204fee23f9Smrg // You should have received a copy of the GNU General Public License and
214fee23f9Smrg // a copy of the GCC Runtime Library Exception along with this program;
224fee23f9Smrg // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
234fee23f9Smrg // <http://www.gnu.org/licenses/>.
244fee23f9Smrg 
254fee23f9Smrg /** @file stdint.h
264fee23f9Smrg  *  This is a Standard C++ Library header.
274fee23f9Smrg  */
284fee23f9Smrg 
294fee23f9Smrg #ifndef _GLIBCXX_STDINT_H
304fee23f9Smrg #define _GLIBCXX_STDINT_H 1
314fee23f9Smrg 
324fee23f9Smrg #pragma GCC system_header
334fee23f9Smrg 
344fee23f9Smrg #include <bits/c++config.h>
354fee23f9Smrg 
3648fb7bfaSmrg #if __cplusplus >= 201103L
374fee23f9Smrg 
384fee23f9Smrg // For 8.22.1/1 (see C99, Notes 219, 220, 222)
394fee23f9Smrg # if _GLIBCXX_HAVE_STDINT_H
404fee23f9Smrg #  ifndef __STDC_LIMIT_MACROS
414fee23f9Smrg #   define _UNDEF__STDC_LIMIT_MACROS
424fee23f9Smrg #   define __STDC_LIMIT_MACROS
434fee23f9Smrg #  endif
444fee23f9Smrg #  ifndef __STDC_CONSTANT_MACROS
454fee23f9Smrg #   define _UNDEF__STDC_CONSTANT_MACROS
464fee23f9Smrg #   define __STDC_CONSTANT_MACROS
474fee23f9Smrg #  endif
484fee23f9Smrg #  include_next <stdint.h>
494fee23f9Smrg #  ifdef _UNDEF__STDC_LIMIT_MACROS
504fee23f9Smrg #   undef __STDC_LIMIT_MACROS
514fee23f9Smrg #   undef _UNDEF__STDC_LIMIT_MACROS
524fee23f9Smrg #  endif
534fee23f9Smrg #  ifdef _UNDEF__STDC_CONSTANT_MACROS
544fee23f9Smrg #   undef __STDC_CONSTANT_MACROS
554fee23f9Smrg #   undef _UNDEF__STDC_CONSTANT_MACROS
564fee23f9Smrg #  endif
574fee23f9Smrg # endif
584fee23f9Smrg 
5948fb7bfaSmrg #ifdef _GLIBCXX_USE_C99_STDINT_TR1
6048fb7bfaSmrg 
6148fb7bfaSmrg namespace std
6248fb7bfaSmrg {
6348fb7bfaSmrg   using ::int8_t;
6448fb7bfaSmrg   using ::int16_t;
6548fb7bfaSmrg   using ::int32_t;
6648fb7bfaSmrg   using ::int64_t;
6748fb7bfaSmrg 
6848fb7bfaSmrg   using ::int_fast8_t;
6948fb7bfaSmrg   using ::int_fast16_t;
7048fb7bfaSmrg   using ::int_fast32_t;
7148fb7bfaSmrg   using ::int_fast64_t;
7248fb7bfaSmrg 
7348fb7bfaSmrg   using ::int_least8_t;
7448fb7bfaSmrg   using ::int_least16_t;
7548fb7bfaSmrg   using ::int_least32_t;
7648fb7bfaSmrg   using ::int_least64_t;
7748fb7bfaSmrg 
7848fb7bfaSmrg   using ::intmax_t;
7948fb7bfaSmrg   using ::intptr_t;
8048fb7bfaSmrg 
8148fb7bfaSmrg   using ::uint8_t;
8248fb7bfaSmrg   using ::uint16_t;
8348fb7bfaSmrg   using ::uint32_t;
8448fb7bfaSmrg   using ::uint64_t;
8548fb7bfaSmrg 
8648fb7bfaSmrg   using ::uint_fast8_t;
8748fb7bfaSmrg   using ::uint_fast16_t;
8848fb7bfaSmrg   using ::uint_fast32_t;
8948fb7bfaSmrg   using ::uint_fast64_t;
9048fb7bfaSmrg 
9148fb7bfaSmrg   using ::uint_least8_t;
9248fb7bfaSmrg   using ::uint_least16_t;
9348fb7bfaSmrg   using ::uint_least32_t;
9448fb7bfaSmrg   using ::uint_least64_t;
9548fb7bfaSmrg 
9648fb7bfaSmrg   using ::uintmax_t;
9748fb7bfaSmrg   using ::uintptr_t;
9848fb7bfaSmrg } // namespace
9948fb7bfaSmrg 
10048fb7bfaSmrg #endif // _GLIBCXX_USE_C99_STDINT_TR1
1014fee23f9Smrg 
1024fee23f9Smrg #else
1034fee23f9Smrg 
1044fee23f9Smrg # if _GLIBCXX_HAVE_STDINT_H
1054fee23f9Smrg #  include_next <stdint.h>
1064fee23f9Smrg # endif
1074fee23f9Smrg 
10848fb7bfaSmrg #endif // C++11
1094fee23f9Smrg 
1104fee23f9Smrg #endif // _GLIBCXX_STDINT_H
111