Skip to content

Commit c984c27

Browse files
authored
Merge pull request #331 from sertonix/uint
Musl compatibility fixes for s390 and powerpc
2 parents c9c6fd6 + 4d375a9 commit c984c27

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

include/openlibm_fenv_powerpc.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@
2929
#ifndef _FENV_H_
3030
#define _FENV_H_
3131

32+
#include <stdint.h>
3233
#include <sys/types.h>
34+
#include "cdefs-compat.h"
3335

3436
#ifndef __fenv_static
3537
#define __fenv_static static
3638
#endif
3739

38-
typedef __uint32_t fenv_t;
39-
typedef __uint32_t fexcept_t;
40+
typedef uint32_t fenv_t;
41+
typedef uint32_t fexcept_t;
4042

4143
/* Exception flags */
4244
#define FE_INEXACT 0x02000000
@@ -99,9 +101,9 @@ union __fpscr {
99101
struct {
100102
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
101103
fenv_t __reg;
102-
__uint32_t __junk;
104+
uint32_t __junk;
103105
#else
104-
__uint32_t __junk;
106+
uint32_t __junk;
105107
fenv_t __reg;
106108
#endif
107109
} __bits;

include/openlibm_fenv_s390.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@
2929
#ifndef _FENV_H_
3030
#define _FENV_H_
3131

32+
#include <stdint.h>
3233
#include <sys/types.h>
34+
#include "cdefs-compat.h"
3335

3436
#ifndef __fenv_static
3537
#define __fenv_static static
3638
#endif
3739

38-
typedef __uint32_t fenv_t;
39-
typedef __uint32_t fexcept_t;
40+
typedef uint32_t fenv_t;
41+
typedef uint32_t fexcept_t;
4042

4143
/* Exception flags */
4244
#define FE_INEXACT 0x080000

0 commit comments

Comments
 (0)