xref: /netbsd-src/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h (revision e9e6e0f6fbc36b8de7586170291cf5fc97cab8b6)
119d950f7Smrg /* Definitions for <stdint.h> types for NetBSD systems.
2*e9e6e0f6Smrg    Copyright (C) 2016-2022 Free Software Foundation, Inc.
319d950f7Smrg 
419d950f7Smrg This file is part of GCC.
519d950f7Smrg 
619d950f7Smrg GCC is free software; you can redistribute it and/or modify
719d950f7Smrg it under the terms of the GNU General Public License as published by
819d950f7Smrg the Free Software Foundation; either version 3, or (at your option)
919d950f7Smrg any later version.
1019d950f7Smrg 
1119d950f7Smrg GCC is distributed in the hope that it will be useful,
1219d950f7Smrg but WITHOUT ANY WARRANTY; without even the implied warranty of
1319d950f7Smrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1419d950f7Smrg GNU General Public License for more details.
1519d950f7Smrg 
1619d950f7Smrg Under Section 7 of GPL version 3, you are granted additional
1719d950f7Smrg permissions described in the GCC Runtime Library Exception, version
1819d950f7Smrg 3.1, as published by the Free Software Foundation.
1919d950f7Smrg 
2019d950f7Smrg You should have received a copy of the GNU General Public License and
2119d950f7Smrg a copy of the GCC Runtime Library Exception along with this program;
2219d950f7Smrg see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
2319d950f7Smrg <http://www.gnu.org/licenses/>.  */
2419d950f7Smrg 
2519d950f7Smrg #define SIG_ATOMIC_TYPE   "int"
2619d950f7Smrg 
2719d950f7Smrg #define INT8_TYPE         "signed char"
2819d950f7Smrg #define INT16_TYPE        "short int"
2919d950f7Smrg #define INT32_TYPE        "int"
3019d950f7Smrg #define INT64_TYPE        (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
3119d950f7Smrg #define UINT8_TYPE        "unsigned char"
3219d950f7Smrg #define UINT16_TYPE       "short unsigned int"
3319d950f7Smrg #define UINT32_TYPE       "unsigned int"
3419d950f7Smrg #define UINT64_TYPE       (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
3519d950f7Smrg 
363f8cba22Smrg #define INT_LEAST8_TYPE   INT8_TYPE
373f8cba22Smrg #define INT_LEAST16_TYPE  INT16_TYPE
383f8cba22Smrg #define INT_LEAST32_TYPE  INT32_TYPE
3919d950f7Smrg #define INT_LEAST64_TYPE  (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
403f8cba22Smrg #define UINT_LEAST8_TYPE  UINT8_TYPE
413f8cba22Smrg #define UINT_LEAST16_TYPE UINT16_TYPE
423f8cba22Smrg #define UINT_LEAST32_TYPE UINT32_TYPE
4319d950f7Smrg #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
4419d950f7Smrg 
453ff6416aSmatt #ifdef CHAR_FAST8
463ff6416aSmatt #define INT_FAST8_TYPE    (LONG_TYPE_SIZE == 64 ? "int" : "signed char")
473ff6416aSmatt #else
483f8cba22Smrg #define INT_FAST8_TYPE    INT32_TYPE
493ff6416aSmatt #endif
503ff6416aSmatt #ifdef SHORT_FAST16
513ff6416aSmatt #define INT_FAST16_TYPE   (LONG_TYPE_SIZE == 64 ? "int" : "short int")
523ff6416aSmatt #else
533f8cba22Smrg #define INT_FAST16_TYPE   INT32_TYPE
543ff6416aSmatt #endif
553f8cba22Smrg #define INT_FAST32_TYPE   INT32_TYPE
5619d950f7Smrg #define INT_FAST64_TYPE   (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
573ff6416aSmatt #ifdef CHAR_FAST8
583ff6416aSmatt #define UINT_FAST8_TYPE   (LONG_TYPE_SIZE == 64 ? "unsigned int" : "unsigned char")
593ff6416aSmatt #else
603f8cba22Smrg #define UINT_FAST8_TYPE   UINT32_TYPE
613ff6416aSmatt #endif
623ff6416aSmatt #ifdef SHORT_FAST16
633ff6416aSmatt #define UINT_FAST16_TYPE  (LONG_TYPE_SIZE == 64 ? "unsigned int" : "short unsigned int")
643ff6416aSmatt #else
653f8cba22Smrg #define UINT_FAST16_TYPE  UINT32_TYPE
663ff6416aSmatt #endif
673f8cba22Smrg #define UINT_FAST32_TYPE  UINT32_TYPE
6819d950f7Smrg #define UINT_FAST64_TYPE  (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
6919d950f7Smrg 
70e66a3c37Smrg #define INTPTR_TYPE       (LONG_TYPE_SIZE == 64 ?  INT64_TYPE :  INT32_TYPE)
71e66a3c37Smrg #define UINTPTR_TYPE      (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE)
72