From 3072e31eb29bead50ee3b6a8c33ee1973d620836 Mon Sep 17 00:00:00 2001 From: Sertonix Date: Sat, 21 Jun 2025 00:38:32 +0200 Subject: [PATCH 1/2] Replace __uint32_t with uint32_t on s390 and powerpc __uint32_t is non-standard and not available on at least musl libc --- include/openlibm_fenv_powerpc.h | 9 +++++---- include/openlibm_fenv_s390.h | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/openlibm_fenv_powerpc.h b/include/openlibm_fenv_powerpc.h index 232ea833..0382020d 100644 --- a/include/openlibm_fenv_powerpc.h +++ b/include/openlibm_fenv_powerpc.h @@ -29,14 +29,15 @@ #ifndef _FENV_H_ #define _FENV_H_ +#include #include #ifndef __fenv_static #define __fenv_static static #endif -typedef __uint32_t fenv_t; -typedef __uint32_t fexcept_t; +typedef uint32_t fenv_t; +typedef uint32_t fexcept_t; /* Exception flags */ #define FE_INEXACT 0x02000000 @@ -99,9 +100,9 @@ union __fpscr { struct { #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) fenv_t __reg; - __uint32_t __junk; + uint32_t __junk; #else - __uint32_t __junk; + uint32_t __junk; fenv_t __reg; #endif } __bits; diff --git a/include/openlibm_fenv_s390.h b/include/openlibm_fenv_s390.h index 84ef080d..85c80094 100644 --- a/include/openlibm_fenv_s390.h +++ b/include/openlibm_fenv_s390.h @@ -29,14 +29,15 @@ #ifndef _FENV_H_ #define _FENV_H_ +#include #include #ifndef __fenv_static #define __fenv_static static #endif -typedef __uint32_t fenv_t; -typedef __uint32_t fexcept_t; +typedef uint32_t fenv_t; +typedef uint32_t fexcept_t; /* Exception flags */ #define FE_INEXACT 0x080000 From 4d375a922f4b69c07ea21a5db642eef647044e01 Mon Sep 17 00:00:00 2001 From: Sertonix Date: Sat, 21 Jun 2025 00:48:59 +0200 Subject: [PATCH 2/2] Include cdefs-compat.h on s390 and powerpc They use __BEGIN_DECLS which might not be avaiable without cdefs-compat.h --- include/openlibm_fenv_powerpc.h | 1 + include/openlibm_fenv_s390.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/openlibm_fenv_powerpc.h b/include/openlibm_fenv_powerpc.h index 0382020d..7592de86 100644 --- a/include/openlibm_fenv_powerpc.h +++ b/include/openlibm_fenv_powerpc.h @@ -31,6 +31,7 @@ #include #include +#include "cdefs-compat.h" #ifndef __fenv_static #define __fenv_static static diff --git a/include/openlibm_fenv_s390.h b/include/openlibm_fenv_s390.h index 85c80094..a21b9ee6 100644 --- a/include/openlibm_fenv_s390.h +++ b/include/openlibm_fenv_s390.h @@ -31,6 +31,7 @@ #include #include +#include "cdefs-compat.h" #ifndef __fenv_static #define __fenv_static static