Do not include float interfaces when using libsa.
We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more accidental seepage.
This commit is contained in:
parent
07c17b2b00
commit
ef1fcaf0f5
@ -114,6 +114,7 @@ static __inline tu_int make_tu(du_int h, du_int l) {
|
|||||||
|
|
||||||
#endif /* CRT_HAS_128BIT */
|
#endif /* CRT_HAS_128BIT */
|
||||||
|
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
su_int u;
|
su_int u;
|
||||||
@ -125,6 +126,7 @@ typedef union
|
|||||||
udwords u;
|
udwords u;
|
||||||
double f;
|
double f;
|
||||||
} double_bits;
|
} double_bits;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -137,6 +139,7 @@ typedef struct
|
|||||||
#endif /* _YUGA_LITTLE_ENDIAN */
|
#endif /* _YUGA_LITTLE_ENDIAN */
|
||||||
} uqwords;
|
} uqwords;
|
||||||
|
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
uqwords u;
|
uqwords u;
|
||||||
@ -160,5 +163,6 @@ typedef struct { long double real, imaginary; } Lcomplex;
|
|||||||
#define COMPLEX_REAL(x) (x).real
|
#define COMPLEX_REAL(x) (x).real
|
||||||
#define COMPLEX_IMAGINARY(x) (x).imaginary
|
#define COMPLEX_IMAGINARY(x) (x).imaginary
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* INT_TYPES_H */
|
#endif /* INT_TYPES_H */
|
||||||
|
|
||||||
|
@ -146,7 +146,9 @@ __BEGIN_DECLS
|
|||||||
char *asctime(const struct tm *);
|
char *asctime(const struct tm *);
|
||||||
clock_t clock(void);
|
clock_t clock(void);
|
||||||
char *ctime(const time_t *);
|
char *ctime(const time_t *);
|
||||||
|
#ifndef _STANDALONE
|
||||||
double difftime(time_t, time_t);
|
double difftime(time_t, time_t);
|
||||||
|
#endif
|
||||||
/* XXX missing: getdate() */
|
/* XXX missing: getdate() */
|
||||||
struct tm *gmtime(const time_t *);
|
struct tm *gmtime(const time_t *);
|
||||||
struct tm *localtime(const time_t *);
|
struct tm *localtime(const time_t *);
|
||||||
|
@ -51,6 +51,9 @@ CFLAGS+= -I${BOOTOBJ}/libsa
|
|||||||
.endif
|
.endif
|
||||||
CFLAGS+= -I${SASRC} -D_STANDALONE
|
CFLAGS+= -I${SASRC} -D_STANDALONE
|
||||||
CFLAGS+= -I${SYSDIR}
|
CFLAGS+= -I${SYSDIR}
|
||||||
|
# Spike the floating point interfaces
|
||||||
|
CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=boaty-mcboatface
|
||||||
|
|
||||||
|
|
||||||
# GELI Support, with backward compat hooks (mostly)
|
# GELI Support, with backward compat hooks (mostly)
|
||||||
.if defined(HAVE_GELI)
|
.if defined(HAVE_GELI)
|
||||||
|
@ -3,5 +3,4 @@
|
|||||||
# Common flags to build lua related files
|
# Common flags to build lua related files
|
||||||
|
|
||||||
CFLAGS+= -I${LUASRC} -I${LDRSRC} -I${LIBLUASRC}
|
CFLAGS+= -I${LUASRC} -I${LDRSRC} -I${LIBLUASRC}
|
||||||
# CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=poison-shake -D__OMIT_FLOAT
|
|
||||||
CFLAGS+= -DLUA_FLOAT_TYPE=LUA_FLOAT_INT64
|
CFLAGS+= -DLUA_FLOAT_TYPE=LUA_FLOAT_INT64
|
||||||
|
@ -70,8 +70,10 @@ typedef unsigned long long __uint64_t;
|
|||||||
*/
|
*/
|
||||||
typedef __uint32_t __clock_t; /* clock()... */
|
typedef __uint32_t __clock_t; /* clock()... */
|
||||||
typedef __int32_t __critical_t;
|
typedef __int32_t __critical_t;
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
typedef __int32_t __intfptr_t;
|
typedef __int32_t __intfptr_t;
|
||||||
typedef __int64_t __intmax_t;
|
typedef __int64_t __intmax_t;
|
||||||
typedef __int32_t __intptr_t;
|
typedef __int32_t __intptr_t;
|
||||||
|
@ -56,8 +56,10 @@ typedef unsigned long __uint64_t;
|
|||||||
*/
|
*/
|
||||||
typedef __int32_t __clock_t; /* clock()... */
|
typedef __int32_t __clock_t; /* clock()... */
|
||||||
typedef __int64_t __critical_t;
|
typedef __int64_t __critical_t;
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
typedef __int64_t __intfptr_t;
|
typedef __int64_t __intfptr_t;
|
||||||
typedef __int64_t __intmax_t;
|
typedef __int64_t __intmax_t;
|
||||||
typedef __int64_t __intptr_t;
|
typedef __int64_t __intptr_t;
|
||||||
|
@ -75,8 +75,10 @@ typedef unsigned long long __uint64_t;
|
|||||||
* Standard type definitions.
|
* Standard type definitions.
|
||||||
*/
|
*/
|
||||||
typedef __int32_t __clock_t; /* clock()... */
|
typedef __int32_t __clock_t; /* clock()... */
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
#ifdef __mips_n64
|
#ifdef __mips_n64
|
||||||
typedef __int64_t __critical_t;
|
typedef __int64_t __critical_t;
|
||||||
typedef __int64_t __intfptr_t;
|
typedef __int64_t __intfptr_t;
|
||||||
|
@ -74,8 +74,10 @@ typedef unsigned long long __uint64_t;
|
|||||||
* Standard type definitions.
|
* Standard type definitions.
|
||||||
*/
|
*/
|
||||||
typedef __uint32_t __clock_t; /* clock()... */
|
typedef __uint32_t __clock_t; /* clock()... */
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
typedef __int64_t __critical_t;
|
typedef __int64_t __critical_t;
|
||||||
typedef __int64_t __intfptr_t;
|
typedef __int64_t __intfptr_t;
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include <machine/setjmp.h>
|
#include <machine/setjmp.h>
|
||||||
|
|
||||||
|
#ifndef _STANDALONE
|
||||||
struct pcb {
|
struct pcb {
|
||||||
register_t pcb_context[20]; /* non-volatile r14-r31 */
|
register_t pcb_context[20]; /* non-volatile r14-r31 */
|
||||||
register_t pcb_cr; /* Condition register */
|
register_t pcb_cr; /* Condition register */
|
||||||
@ -81,6 +82,7 @@ struct pcb {
|
|||||||
} booke;
|
} booke;
|
||||||
} pcb_cpu;
|
} pcb_cpu;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
|
|
||||||
|
@ -56,8 +56,10 @@ typedef unsigned long __uint64_t;
|
|||||||
*/
|
*/
|
||||||
typedef __int32_t __clock_t; /* clock()... */
|
typedef __int32_t __clock_t; /* clock()... */
|
||||||
typedef __int64_t __critical_t;
|
typedef __int64_t __critical_t;
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
typedef __int64_t __intfptr_t;
|
typedef __int64_t __intfptr_t;
|
||||||
typedef __int64_t __intmax_t;
|
typedef __int64_t __intmax_t;
|
||||||
typedef __int64_t __intptr_t;
|
typedef __int64_t __intptr_t;
|
||||||
|
@ -58,8 +58,10 @@ typedef unsigned long __uint64_t;
|
|||||||
*/
|
*/
|
||||||
typedef __int32_t __clock_t; /* clock()... */
|
typedef __int32_t __clock_t; /* clock()... */
|
||||||
typedef __int64_t __critical_t;
|
typedef __int64_t __critical_t;
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
typedef __int64_t __intfptr_t;
|
typedef __int64_t __intfptr_t;
|
||||||
typedef __int64_t __intmax_t;
|
typedef __int64_t __intmax_t;
|
||||||
typedef __int64_t __intptr_t;
|
typedef __int64_t __intptr_t;
|
||||||
|
@ -104,7 +104,9 @@ typedef __uint_least32_t __char32_t;
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
long long __max_align1 __aligned(_Alignof(long long));
|
long long __max_align1 __aligned(_Alignof(long long));
|
||||||
|
#ifndef _STANDALONE
|
||||||
long double __max_align2 __aligned(_Alignof(long double));
|
long double __max_align2 __aligned(_Alignof(long double));
|
||||||
|
#endif
|
||||||
} __max_align_t;
|
} __max_align_t;
|
||||||
|
|
||||||
typedef __uint64_t __dev_t; /* device number */
|
typedef __uint64_t __dev_t; /* device number */
|
||||||
|
@ -74,15 +74,19 @@ typedef unsigned long long __uint64_t;
|
|||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
typedef __int32_t __clock_t; /* clock()... */
|
typedef __int32_t __clock_t; /* clock()... */
|
||||||
typedef __int64_t __critical_t;
|
typedef __int64_t __critical_t;
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef double __double_t;
|
typedef double __double_t;
|
||||||
typedef float __float_t;
|
typedef float __float_t;
|
||||||
|
#endif
|
||||||
typedef __int64_t __intfptr_t;
|
typedef __int64_t __intfptr_t;
|
||||||
typedef __int64_t __intptr_t;
|
typedef __int64_t __intptr_t;
|
||||||
#else
|
#else
|
||||||
typedef unsigned long __clock_t;
|
typedef unsigned long __clock_t;
|
||||||
typedef __int32_t __critical_t;
|
typedef __int32_t __critical_t;
|
||||||
|
#ifndef _STANDALONE
|
||||||
typedef long double __double_t;
|
typedef long double __double_t;
|
||||||
typedef long double __float_t;
|
typedef long double __float_t;
|
||||||
|
#endif
|
||||||
typedef __int32_t __intfptr_t;
|
typedef __int32_t __intfptr_t;
|
||||||
typedef __int32_t __intptr_t;
|
typedef __int32_t __intptr_t;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user