From 3ff6416ad70c7ec7f6739c8d07c992d44823d511 Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 20 Aug 2014 16:00:15 +0000 Subject: [PATCH] Fix netbsd-stdint.h to allow char and short for int_fast8_t and int_fast16_t and their corresponding unsigned variants. --- external/gpl3/gcc/dist/gcc/config.gcc | 4 ++++ .../gpl3/gcc/dist/gcc/config/netbsd-stdint.h | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/external/gpl3/gcc/dist/gcc/config.gcc b/external/gpl3/gcc/dist/gcc/config.gcc index 6cdb6623fbb9..bc5999b27482 100644 --- a/external/gpl3/gcc/dist/gcc/config.gcc +++ b/external/gpl3/gcc/dist/gcc/config.gcc @@ -1123,6 +1123,7 @@ hppa*-*-netbsd* | parisc*-*-netbsd*) tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} \ pa/pa-netbsd.h pa/pa32-regs.h pa/pa32-netbsd.h" tmake_file="${tmake_file} pa/t-netbsd" + tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; hppa[12]*-*-hpux10*) @@ -1279,6 +1280,7 @@ x86_64-*-freebsd*) i[34567]86-*-netbsdelf*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h" tmake_file="${tmake_file} i386/t-crtstuff" + tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; i[34567]86-*-netbsd*) @@ -1752,6 +1754,7 @@ m68k-*-elf* | fido-*-elf*) m68010-*-netbsdelf* | m68k-*-netbsdelf* | m5407-*-netbsdelf*) tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h" tm_defines="${tm_defines} MOTOROLA=1 USE_GAS=1" + tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" default_cf_cpu=5475 default_m68k_cpu=68020 @@ -2745,6 +2748,7 @@ vax-*-linux*) ;; vax-*-netbsdelf*) tm_file="${tm_file} elfos.h ${nbsd_tm_file} vax/elf.h vax/netbsd-elf.h" + tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1" extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt" ;; vax-*-openbsd*) diff --git a/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h b/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h index 69338f78a535..0cf848bb9a4d 100644 --- a/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h +++ b/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h @@ -43,12 +43,28 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define UINT_LEAST32_TYPE "unsigned int" #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") +#ifdef CHAR_FAST8 +#define INT_FAST8_TYPE (LONG_TYPE_SIZE == 64 ? "int" : "signed char") +#else #define INT_FAST8_TYPE "int" +#endif +#ifdef SHORT_FAST16 +#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "int" : "short int") +#else #define INT_FAST16_TYPE "int" +#endif #define INT_FAST32_TYPE "int" #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") +#ifdef CHAR_FAST8 +#define UINT_FAST8_TYPE (LONG_TYPE_SIZE == 64 ? "unsigned int" : "unsigned char") +#else #define UINT_FAST8_TYPE "unsigned int" +#endif +#ifdef SHORT_FAST16 +#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "unsigned int" : "short unsigned int") +#else #define UINT_FAST16_TYPE "unsigned int" +#endif #define UINT_FAST32_TYPE "unsigned int" #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")