From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 0B2A73858416; Wed, 12 Jan 2022 08:46:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B2A73858416 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6515] libgfortran: Fix build on non-glibc targets X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 2c4dccb605d485293291878397b42927dc050481 X-Git-Newrev: 7c3b9c17363bf30fcab9814252b9d5860711a10b Message-Id: <20220112084611.0B2A73858416@sourceware.org> Date: Wed, 12 Jan 2022 08:46:11 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2022 08:46:11 -0000 https://gcc.gnu.org/g:7c3b9c17363bf30fcab9814252b9d5860711a10b commit r12-6515-g7c3b9c17363bf30fcab9814252b9d5860711a10b Author: Jakub Jelinek Date: Wed Jan 12 09:43:18 2022 +0100 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: --- libgfortran/libgfortran.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 2aec78fc401..4329d4c87bc 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.