fixes for freebsd9

This commit is contained in:
Mike Nolta 2012-10-30 17:54:30 -04:00
parent f7c5d2787a
commit ec53659c6a
3 changed files with 7 additions and 4 deletions

View file

@ -55,6 +55,9 @@
#define _BYTE_ORDER BYTE_ORDER
#endif
#ifdef __FreeBSD__
#include <machine/endian.h>
#endif
#ifdef WIN32
#define _LITTLE_ENDIAN 1234
@ -112,4 +115,4 @@ union IEEEd2bits {
} bits;
};
#endif
#endif

View file

@ -303,7 +303,7 @@ irint(double x)
{
int n;
asm("cvtsd2si %1,%0" : "=r" (n) : "x" (x));
__asm__("cvtsd2si %1,%0" : "=r" (n) : "x" (x));
return (n);
}
#define HAVE_EFFICIENT_IRINT
@ -315,7 +315,7 @@ irint(double x)
{
int n;
asm("fistl %0" : "=m" (n) : "t" (x));
__asm__("fistl %0" : "=m" (n) : "t" (x));
return (n);
}
#define HAVE_EFFICIENT_IRINT

View file

@ -36,7 +36,7 @@
#include "math_private.h"
#if !defined(__APPLE__)
#if !defined(__APPLE__) && !defined(__FreeBSD__)
static __inline int digittoint(int c) {
if ('0' <= c <= '9')
return (c - '0');