mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-07-04 03:26:41 +02:00
Build fix for amd64 Linux
This commit is contained in:
parent
c3d4e51cd8
commit
f21624349f
3 changed files with 17 additions and 17 deletions
|
@ -42,7 +42,7 @@
|
||||||
#ifndef _MACHINE_IEEEFP_H_
|
#ifndef _MACHINE_IEEEFP_H_
|
||||||
#define _MACHINE_IEEEFP_H_
|
#define _MACHINE_IEEEFP_H_
|
||||||
|
|
||||||
#if !defined(_SYS_CDEFS_H_) && !defined(_CDEFS_H_)
|
#if !defined(_SYS_CDEFS_H) && !defined(_SYS_CDEFS_H_) && !defined(_CDEFS_H_)
|
||||||
#error this file needs sys/cdefs.h as a prerequisite
|
#error this file needs sys/cdefs.h as a prerequisite
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
30
amd64/fenv.h
30
amd64/fenv.h
|
@ -29,8 +29,8 @@
|
||||||
#ifndef _FENV_H_
|
#ifndef _FENV_H_
|
||||||
#define _FENV_H_
|
#define _FENV_H_
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include "include/cdefs-compat.h"
|
||||||
#include <sys/_types.h>
|
#include "include/types-compat.h"
|
||||||
|
|
||||||
#ifndef __fenv_static
|
#ifndef __fenv_static
|
||||||
#define __fenv_static static
|
#define __fenv_static static
|
||||||
|
@ -38,15 +38,15 @@
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
__uint32_t __control;
|
uint32_t __control;
|
||||||
__uint32_t __status;
|
uint32_t __status;
|
||||||
__uint32_t __tag;
|
uint32_t __tag;
|
||||||
char __other[16];
|
char __other[16];
|
||||||
} __x87;
|
} __x87;
|
||||||
__uint32_t __mxcsr;
|
uint32_t __mxcsr;
|
||||||
} fenv_t;
|
} fenv_t;
|
||||||
|
|
||||||
typedef __uint16_t fexcept_t;
|
typedef uint16_t fexcept_t;
|
||||||
|
|
||||||
/* Exception flags */
|
/* Exception flags */
|
||||||
#define FE_INVALID 0x01
|
#define FE_INVALID 0x01
|
||||||
|
@ -114,8 +114,8 @@ feclearexcept(int __excepts)
|
||||||
__fenv_static inline int
|
__fenv_static inline int
|
||||||
fegetexceptflag(fexcept_t *__flagp, int __excepts)
|
fegetexceptflag(fexcept_t *__flagp, int __excepts)
|
||||||
{
|
{
|
||||||
__uint32_t __mxcsr;
|
uint32_t __mxcsr;
|
||||||
__uint16_t __status;
|
uint16_t __status;
|
||||||
|
|
||||||
__stmxcsr(&__mxcsr);
|
__stmxcsr(&__mxcsr);
|
||||||
__fnstsw(&__status);
|
__fnstsw(&__status);
|
||||||
|
@ -129,8 +129,8 @@ int feraiseexcept(int __excepts);
|
||||||
__fenv_static inline int
|
__fenv_static inline int
|
||||||
fetestexcept(int __excepts)
|
fetestexcept(int __excepts)
|
||||||
{
|
{
|
||||||
__uint32_t __mxcsr;
|
uint32_t __mxcsr;
|
||||||
__uint16_t __status;
|
uint16_t __status;
|
||||||
|
|
||||||
__stmxcsr(&__mxcsr);
|
__stmxcsr(&__mxcsr);
|
||||||
__fnstsw(&__status);
|
__fnstsw(&__status);
|
||||||
|
@ -140,7 +140,7 @@ fetestexcept(int __excepts)
|
||||||
__fenv_static inline int
|
__fenv_static inline int
|
||||||
fegetround(void)
|
fegetround(void)
|
||||||
{
|
{
|
||||||
__uint16_t __control;
|
uint16_t __control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We assume that the x87 and the SSE unit agree on the
|
* We assume that the x87 and the SSE unit agree on the
|
||||||
|
@ -155,8 +155,8 @@ fegetround(void)
|
||||||
__fenv_static inline int
|
__fenv_static inline int
|
||||||
fesetround(int __round)
|
fesetround(int __round)
|
||||||
{
|
{
|
||||||
__uint32_t __mxcsr;
|
uint32_t __mxcsr;
|
||||||
__uint16_t __control;
|
uint16_t __control;
|
||||||
|
|
||||||
if (__round & ~_ROUND_MASK)
|
if (__round & ~_ROUND_MASK)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
@ -205,7 +205,7 @@ int fedisableexcept(int __mask);
|
||||||
static inline int
|
static inline int
|
||||||
fegetexcept(void)
|
fegetexcept(void)
|
||||||
{
|
{
|
||||||
__uint16_t __control;
|
uint16_t __control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We assume that the masks for the x87 and the SSE unit are
|
* We assume that the masks for the x87 and the SSE unit are
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
/* Not sure what to do about __pure2 on linux */
|
/* Not sure what to do about __pure2 on linux */
|
||||||
|
@ -16,7 +17,6 @@
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
/* Not sure what to do about __pure2 on linux */
|
/* Not sure what to do about __pure2 on linux */
|
||||||
#define __pure2
|
#define __pure2
|
||||||
#include <stdint.h>
|
|
||||||
typedef uint8_t u_int8_t;
|
typedef uint8_t u_int8_t;
|
||||||
typedef uint16_t u_int16_t;
|
typedef uint16_t u_int16_t;
|
||||||
typedef uint32_t u_int32_t;
|
typedef uint32_t u_int32_t;
|
||||||
|
|
Loading…
Add table
Reference in a new issue