From 878a21d7417440f47284f44b6c281a081c32794c Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Mon, 9 Sep 2019 21:48:40 +0200 Subject: [PATCH] PowerPC: use long int for int32_t, to match Apple's SInt32 and the m68k target --- gcc/gcc/config.gcc | 2 +- gcc/gcc/config/rs6000/macos.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc index 27e1d39231..19fc2b6fc8 100644 --- a/gcc/gcc/config.gcc +++ b/gcc/gcc/config.gcc @@ -2785,7 +2785,7 @@ powerpcle-*-eabi*) use_gcc_stdint=wrap ;; powerpc-apple-macos*) - tm_file="${tm_file} rs6000/xcoff.h rs6000/aix-stdint.h rs6000/macos.h" + tm_file="${tm_file} rs6000/xcoff.h rs6000/macos.h" tmake_file="rs6000/t-macos" extra_options="${extra_options} rs6000/aix64.opt" use_collect2=yes diff --git a/gcc/gcc/config/rs6000/macos.h b/gcc/gcc/config/rs6000/macos.h index c2f5d2f925..c6dd2437f3 100644 --- a/gcc/gcc/config/rs6000/macos.h +++ b/gcc/gcc/config/rs6000/macos.h @@ -255,3 +255,38 @@ fprintf ((STREAM), "void %s() {\n\t%s();\n}\n", aix_shared_fininame, (FUNC)) #endif + + + +#define SIG_ATOMIC_TYPE "int" + +#define INT8_TYPE "signed char" +#define INT16_TYPE "short int" +#define INT32_TYPE "long int" +#define INT64_TYPE "long long int" +#define UINT8_TYPE "unsigned char" +#define UINT16_TYPE "short unsigned int" +#define UINT32_TYPE "long unsigned int" +#define UINT64_TYPE "long long unsigned int" + +#define INT_LEAST8_TYPE "signed char" +#define INT_LEAST16_TYPE "short int" +#define INT_LEAST32_TYPE "long int" +#define INT_LEAST64_TYPE "long long int" +#define UINT_LEAST8_TYPE "unsigned char" +#define UINT_LEAST16_TYPE "short unsigned int" +#define UINT_LEAST32_TYPE "long unsigned int" +#define UINT_LEAST64_TYPE "long long unsigned int" + +#define INT_FAST8_TYPE "signed char" +#define INT_FAST16_TYPE "short int" +#define INT_FAST32_TYPE "long int" +#define INT_FAST64_TYPE "long long int" +#define UINT_FAST8_TYPE "unsigned char" +#define UINT_FAST16_TYPE "short unsigned int" +#define UINT_FAST32_TYPE "long unsigned int" +#define UINT_FAST64_TYPE "long long unsigned int" + +#define INTPTR_TYPE "long int" +#define UINTPTR_TYPE "long unsigned int" +