summaryrefslogtreecommitdiff
path: root/libgfortran/libgfortran.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-01-12 09:43:18 +0100
committerJakub Jelinek <jakub@redhat.com>2022-01-12 09:43:18 +0100
commit7c3b9c17363bf30fcab9814252b9d5860711a10b (patch)
tree367bd1aee3eea6681ebf283a6a73635e9a31299b /libgfortran/libgfortran.h
parent2c4dccb605d485293291878397b42927dc050481 (diff)
downloadgcc-7c3b9c17363bf30fcab9814252b9d5860711a10b.tar.gz
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 <jakub@redhat.com> * libgfortran.h (POWER_IEEE128): Use __GLIBC_PREREQ in a separate #if directive inside of #if ... && defined __GLIBC_PREREQ.
Diffstat (limited to 'libgfortran/libgfortran.h')
-rw-r--r--libgfortran/libgfortran.h4
1 files changed, 3 insertions, 1 deletions
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 <ctype.h> should only be used on values that can be
represented as unsigned char, otherwise the behavior is undefined.