From: Jakub Jelinek Date: Wed, 12 Jan 2022 08:43:18 +0000 (+0100) Subject: libgfortran: Fix build on non-glibc targets X-Git-Tag: upstream/12.2.0~2182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c3b9c17363bf30fcab9814252b9d5860711a10b;p=platform%2Fupstream%2Fgcc.git libgfortran: Fix build on non-glibc targets When the __GLIBC_PREREQ macro isn't defined, the #if ... && defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32) directive has invalid syntax - the __GLIBC_PREREQ in there evaluates to 0 and is followed by (2, 32). 2022-01-12 Jakub Jelinek * libgfortran.h (POWER_IEEE128): Use __GLIBC_PREREQ in a separate #if directive inside of #if ... && defined __GLIBC_PREREQ. --- diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 2aec78f..4329d4c 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -104,9 +104,11 @@ typedef off_t gfc_offset; #endif #if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \ - && defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32) + && defined __GLIBC_PREREQ +#if __GLIBC_PREREQ (2, 32) #define POWER_IEEE128 1 #endif +#endif /* These functions from should only be used on values that can be represented as unsigned char, otherwise the behavior is undefined.