mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-01-03 23:43:41 +01:00
fixes for freebsd9
This commit is contained in:
parent
f7c5d2787a
commit
ec53659c6a
3 changed files with 7 additions and 4 deletions
|
@ -55,6 +55,9 @@
|
||||||
#define _BYTE_ORDER BYTE_ORDER
|
#define _BYTE_ORDER BYTE_ORDER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <machine/endian.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define _LITTLE_ENDIAN 1234
|
#define _LITTLE_ENDIAN 1234
|
||||||
|
|
|
@ -303,7 +303,7 @@ irint(double x)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
asm("cvtsd2si %1,%0" : "=r" (n) : "x" (x));
|
__asm__("cvtsd2si %1,%0" : "=r" (n) : "x" (x));
|
||||||
return (n);
|
return (n);
|
||||||
}
|
}
|
||||||
#define HAVE_EFFICIENT_IRINT
|
#define HAVE_EFFICIENT_IRINT
|
||||||
|
@ -315,7 +315,7 @@ irint(double x)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
asm("fistl %0" : "=m" (n) : "t" (x));
|
__asm__("fistl %0" : "=m" (n) : "t" (x));
|
||||||
return (n);
|
return (n);
|
||||||
}
|
}
|
||||||
#define HAVE_EFFICIENT_IRINT
|
#define HAVE_EFFICIENT_IRINT
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#if !defined(__APPLE__)
|
#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
||||||
static __inline int digittoint(int c) {
|
static __inline int digittoint(int c) {
|
||||||
if ('0' <= c <= '9')
|
if ('0' <= c <= '9')
|
||||||
return (c - '0');
|
return (c - '0');
|
||||||
|
|
Loading…
Reference in a new issue