initial attempt getting everything to build on windows

This commit is contained in:
Jameson Nash 2012-04-08 20:03:36 -04:00
parent 11f62e053f
commit 0df00dd0f7
207 changed files with 450 additions and 255 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
*.o
*~
*.a
*.dll
*.so
*.dylib

View file

@ -1,5 +1,5 @@
CC=gcc
CFLAGS=-O2 -fPIC -I. -I../include -I../ld128 -I../src -D__BSD_VISIBLE -Wno-implicit-function-declaration
CFLAGS=-O2 -I. -I../include -I../ld128 -I../src -D__BSD_VISIBLE -Wno-implicit-function-declaration
default: all
@ -13,13 +13,28 @@ clean:
OS = $(shell uname)
ARCH = $(shell uname -m)
ifeq ($(OS), MINGW32_NT-6.1)
OS=WINNT
endif
ifeq ($(OS), Linux)
SHLIB_EXT = so
CFLAGS+=-fPIC
endif
ifeq ($(OS), FreeBSD)
SHLIB_EXT = so
CFLAGS+=-fPIC
endif
ifeq ($(OS), Darwin)
SHLIB_EXT = dylib
CFLAGS+=-std=c99
CFLAGS+=-std=c99 -fPIC
endif
ifeq ($(OS), WINNT)
SHLIB_EXT = dll
endif
# Colors for make

View file

@ -32,7 +32,7 @@
*/
/* @(#)exp.c 8.1 (Berkeley) 6/4/93 */
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_exp.c,v 1.9 2011/10/16 05:37:20 das Exp $");

View file

@ -32,7 +32,7 @@
*/
/* @(#)log.c 8.2 (Berkeley) 11/30/93 */
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_log.c,v 1.9 2008/02/22 02:26:51 das Exp $");
#include <openlibm.h>

View file

@ -32,7 +32,7 @@
*/
/* @(#)gamma.c 8.1 (Berkeley) 6/4/93 */
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_tgamma.c,v 1.10 2008/02/22 02:26:51 das Exp $");
/*

View file

@ -37,7 +37,7 @@
#ifndef _MATHIMPL_H_
#define _MATHIMPL_H_
#include <sys/cdefs.h>
#include "cdefs-compat.h"
#include <openlibm.h>
#include "../src/math_private.h"

64
include/cdefs-compat.h Normal file
View file

@ -0,0 +1,64 @@
#ifndef _CDEFS_COMPAT_H_
#define _CDEFS_COMPAT_H_
#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
#define __WIN32__
#endif
#ifndef __WIN32__
#include "sys/cdefs.h"
#else //__WIN32__
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#ifdef __GNUC__
#define __strong_reference(sym,aliassym) \
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
#ifdef __ELF__
#ifdef __STDC__
#define __weak_reference(sym,alias) \
__asm__(".weak " #alias); \
__asm__(".equ " #alias ", " #sym)
#define __warn_references(sym,msg) \
__asm__(".section .gnu.warning." #sym); \
__asm__(".asciz \"" msg "\""); \
__asm__(".previous")
#else
#define __weak_reference(sym,alias) \
__asm__(".weak alias"); \
__asm__(".equ alias, sym")
#define __warn_references(sym,msg) \
__asm__(".section .gnu.warning.sym"); \
__asm__(".asciz \"msg\""); \
__asm__(".previous")
#endif /* __STDC__ */
#else /* !__ELF__ */
#ifdef __STDC__
#define __weak_reference(sym,alias) \
__asm__(".stabs \"_" #alias "\",11,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
#define __warn_references(sym,msg) \
__asm__(".stabs \"" msg "\",30,0,0,0"); \
__asm__(".stabs \"_" #sym "\",1,0,0,0")
#else
#define __weak_reference(sym,alias) \
__asm__(".stabs \"_/**/alias\",11,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0")
#define __warn_references(sym,msg) \
__asm__(".stabs msg,30,0,0,0"); \
__asm__(".stabs \"_/**/sym\",1,0,0,0")
#endif /* __STDC__ */
#endif /* __ELF__ */
#endif /* __GNUC__ */
#endif
#endif

View file

@ -26,6 +26,8 @@
*
* $FreeBSD: src/lib/libc/include/fpmath.h,v 1.4 2008/12/23 22:20:59 marcel Exp $
*/
#ifndef _FPMATH_H_
#define _FPMATH_H_
// Currently assumes Intel platform
#if defined (__i386__) || defined(__x86_64__)
@ -58,12 +60,12 @@
#define _LITTLE_ENDIAN 1234
#define _BIG_ENDIAN 4321
#define _PDP_ENDIAN 3412
#define _BYTE_ORDER __LITTLE_ENDIAN
#define _FLOAT_WORD_ORDER __LITTLE_ENDIAN
#define LITTLE_ENDIAN __LITTLE_ENDIAN
#define BIG_ENDIAN __BIG_ENDIAN
#define PDP_ENDIAN __PDP_ENDIAN
#define BYTE_ORDER __BYTE_ORDER
#define _BYTE_ORDER _LITTLE_ENDIAN
#define _FLOAT_WORD_ORDER _LITTLE_ENDIAN
#define LITTLE_ENDIAN _LITTLE_ENDIAN
#define BIG_ENDIAN _BIG_ENDIAN
#define PDP_ENDIAN _PDP_ENDIAN
#define BYTE_ORDER _BYTE_ORDER
#endif
#ifndef _IEEE_WORD_ORDER
@ -109,3 +111,5 @@ union IEEEd2bits {
#endif
} bits;
};
#endif

33
include/types-compat.h Normal file
View file

@ -0,0 +1,33 @@
#ifndef _TYPES_COMPAT_H_
#define _TYPES_COMPAT_H_
#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
#define __WIN32__
#endif
#ifdef __APPLE__
#include <sys/_types.h>
#include <machine/_limits.h>
#endif
#ifdef __linux__
/* Not sure what to do about __pure2 on linux */
#define __pure2
#include <sys/types.h>
#include <limits.h>
#endif
#ifdef __WIN32__
/* Not sure what to do about __pure2 on linux */
#define __pure2
#include <sys/types.h>
#include <stdint.h>
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
#include <limits.h>
#endif
#endif

View file

@ -13,7 +13,7 @@
* Optimized by Bruce D. Evans.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld128/e_rem_pio2l.h,v 1.2 2011/05/30 19:41:28 kargl Exp $");
/* ld128 version of __ieee754_rem_pio2l(x,y)

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld128/invtrig.c,v 1.1 2008/07/31 22:41:26 das Exp $");
#include "invtrig.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld128/k_cosl.c,v 1.1 2008/02/17 07:32:31 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld128/k_sinl.c,v 1.1 2008/02/17 07:32:31 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld128/k_tanl.c,v 1.1 2008/02/17 07:32:31 das Exp $");
/*

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld128/s_exp2l.c,v 1.3 2008/02/13 10:44:44 bde Exp $");
#include <float.h>

View file

@ -13,7 +13,7 @@
* Optimized by Bruce D. Evans.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld80/e_rem_pio2l.h,v 1.3 2011/06/18 13:56:33 benl Exp $");
/* ld80 version of __ieee754_rem_pio2l(x,y)

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld80/invtrig.c,v 1.1 2008/07/31 22:41:26 das Exp $");
#include "invtrig.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld80/k_cosl.c,v 1.1 2008/02/17 07:32:14 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld80/k_sinl.c,v 1.1 2008/02/17 07:32:14 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld80/k_tanl.c,v 1.3 2008/02/18 15:39:52 bde Exp $");
/*

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/ld80/s_exp2l.c,v 1.3 2008/02/13 10:44:44 bde Exp $");
#include <float.h>

View file

@ -20,8 +20,9 @@ SRCS= \
s_finite.o s_finitef.o \
s_floor.o s_floorf.o s_fma.o s_fmaf.o \
s_fmax.o s_fmaxf.o s_fmaxl.o s_fmin.o \
s_fminf.o s_fminl.o s_frexp.o s_frexpf.o s_ilogb.o s_ilogbf.o \
s_ilogbl.o s_isfinite.o s_isnormal.o s_isnan.o \
s_fminf.o s_fminl.o s_fpclassify.o \
s_frexp.o s_frexpf.o s_ilogb.o s_ilogbf.o \
s_ilogbl.o s_isinf.o s_isfinite.o s_isnormal.o s_isnan.o \
s_llrint.o s_llrintf.o s_llround.o s_llroundf.o s_llroundl.o \
s_log1p.o s_log1pf.o s_logb.o s_logbf.o s_lrint.o s_lrintf.o \
s_lround.o s_lroundf.o s_lroundl.o s_modf.o s_modff.o \

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_acos.c,v 1.13 2008/07/31 22:41:26 das Exp $");
/* __ieee754_acos(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.11 2008/08/03 17:39:54 das Exp $");
#include "openlibm.h"

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_acosh.c,v 1.9 2008/02/22 02:30:34 das Exp $");
/* __ieee754_acosh(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_acoshf.c,v 1.8 2008/02/22 02:30:34 das Exp $");
#include "openlibm.h"

View file

@ -12,7 +12,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_acosl.c,v 1.2 2008/08/02 03:56:22 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_asin.c,v 1.15 2011/02/10 07:37:50 das Exp $");
/* __ieee754_asin(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.13 2008/08/08 00:21:27 das Exp $");
#include "openlibm.h"

View file

@ -12,7 +12,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_asinl.c,v 1.2 2008/08/03 17:49:05 das Exp $");
/*

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_atan2.c,v 1.14 2008/08/02 19:17:00 das Exp $");
/* __ieee754_atan2(y,x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_atan2f.c,v 1.12 2008/08/03 17:39:54 das Exp $");
#include "openlibm.h"

View file

@ -13,7 +13,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_atan2l.c,v 1.3 2008/08/02 19:17:00 das Exp $");
/*

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_atanh.c,v 1.8 2008/02/22 02:30:34 das Exp $");
/* __ieee754_atanh(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_atanhf.c,v 1.7 2008/02/22 02:30:34 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_cosh.c,v 1.10 2011/10/21 06:28:47 das Exp $");
/* __ieee754_cosh(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_coshf.c,v 1.9 2011/10/21 06:28:47 das Exp $");
#include "openlibm.h"

View file

@ -10,7 +10,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_exp.c,v 1.14 2011/10/21 06:26:38 das Exp $");
/* __ieee754_exp(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_expf.c,v 1.16 2011/10/21 06:26:38 das Exp $");
#include <float.h>

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_fmod.c,v 1.10 2008/02/22 02:30:34 das Exp $");
/*

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_fmodf.c,v 1.7 2008/02/22 02:30:34 das Exp $");
/*

View file

@ -10,7 +10,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_fmodl.c,v 1.2 2008/07/31 20:09:47 das Exp $");
#include <float.h>

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gamma.c,v 1.8 2008/02/22 02:30:34 das Exp $");
/* __ieee754_gamma(x)

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gamma_r.c,v 1.8 2008/02/22 02:30:34 das Exp $");
/* __ieee754_gamma_r(x, signgamp)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gammaf.c,v 1.7 2008/02/22 02:30:35 das Exp $");
/* __ieee754_gammaf(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gammaf_r.c,v 1.8 2008/02/22 02:30:35 das Exp $");
/* __ieee754_gammaf_r(x, signgamp)

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_hypot.c,v 1.14 2011/10/15 07:00:28 das Exp $");
/* __ieee754_hypot(x,y)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_hypotf.c,v 1.14 2011/10/15 07:00:28 das Exp $");
#include "openlibm.h"

View file

@ -10,7 +10,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_hypotl.c,v 1.3 2011/10/16 05:36:39 das Exp $");
/* long double version of hypot(). See e_hypot.c for most comments. */

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j0.c,v 1.9 2008/02/22 02:30:35 das Exp $");
/* __ieee754_j0(x), __ieee754_y0(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j0f.c,v 1.8 2008/02/22 02:30:35 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j1.c,v 1.9 2008/02/22 02:30:35 das Exp $");
/* __ieee754_j1(x), __ieee754_y1(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_j1f.c,v 1.8 2008/02/22 02:30:35 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_jn.c,v 1.11 2010/11/13 10:54:10 uqs Exp $");
/*

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_jnf.c,v 1.11 2010/11/13 10:54:10 uqs Exp $");
#include "openlibm.h"

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_lgamma.c,v 1.9 2008/02/22 02:30:35 das Exp $");
/* __ieee754_lgamma(x)

View file

@ -12,7 +12,7 @@
*
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_lgamma_r.c,v 1.11 2011/10/15 07:00:28 das Exp $");
/* __ieee754_lgamma_r(x, signgamp)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_lgammaf.c,v 1.8 2008/02/22 02:30:35 das Exp $");
/* __ieee754_lgammaf(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_lgammaf_r.c,v 1.12 2011/10/15 07:00:28 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_log.c,v 1.15 2008/03/29 16:37:59 das Exp $");
/* __ieee754_log(x)

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_log10.c,v 1.15 2011/10/15 05:23:28 das Exp $");
/*

View file

@ -9,7 +9,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_log10f.c,v 1.13 2011/10/16 05:36:23 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_log2.c,v 1.4 2011/10/15 05:23:28 das Exp $");
/*

View file

@ -9,7 +9,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_log2f.c,v 1.5 2011/10/15 05:23:28 das Exp $");
/*

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_logf.c,v 1.11 2008/03/29 16:37:59 das Exp $");
#include "openlibm.h"

View file

@ -9,7 +9,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_pow.c,v 1.14 2011/10/21 06:26:07 das Exp $");
/* __ieee754_pow(x,y) return x**y

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_powf.c,v 1.16 2011/10/21 06:26:07 das Exp $");
#include "openlibm.h"

View file

@ -13,7 +13,7 @@
* Optimized by Bruce D. Evans.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.22 2011/06/19 17:07:58 kargl Exp $");
/* __ieee754_rem_pio2(x,y)

View file

@ -14,7 +14,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.32 2009/06/03 08:16:34 ed Exp $");
/* __ieee754_rem_pio2f(x,y)

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_remainder.c,v 1.12 2008/03/30 20:47:42 das Exp $");
/* __ieee754_remainder(x,p)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_remainderf.c,v 1.8 2008/02/12 17:11:36 bde Exp $");
#include "openlibm.h"

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_remainderl.c,v 1.1 2008/03/30 20:47:42 das Exp $");
#include <openlibm.h>

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_scalb.c,v 1.13 2008/02/22 02:30:35 das Exp $");
/*

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_scalbf.c,v 1.13 2008/02/22 02:30:35 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_sinh.c,v 1.11 2011/10/21 06:28:47 das Exp $");
/* __ieee754_sinh(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_sinhf.c,v 1.10 2011/10/21 06:28:47 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_sqrt.c,v 1.11 2008/03/02 01:47:58 das Exp $");
/* __ieee754_sqrt(x)

View file

@ -24,7 +24,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_sqrtl.c,v 1.1 2008/03/02 01:47:58 das Exp $");
#include <fenv.h>

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_cos.c,v 1.12 2008/02/19 12:54:14 bde Exp $");
/*

View file

@ -15,7 +15,7 @@
*/
#ifndef INLINE_KERNEL_COSDF
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_cosf.c,v 1.18 2009/06/03 08:16:34 ed Exp $");
#endif

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_exp.c,v 1.1 2011/10/21 06:27:56 das Exp $");
#include <complex.h>

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_expf.c,v 1.1 2011/10/21 06:27:56 das Exp $");
#include <complex.h>

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_log.h,v 1.2 2011/10/15 05:23:28 das Exp $");
/*

View file

@ -9,7 +9,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_logf.h,v 1.3 2011/10/15 05:23:28 das Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.11 2008/02/25 11:43:20 bde Exp $");
/*

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_sin.c,v 1.11 2008/02/19 12:54:14 bde Exp $");
/* __kernel_sin( x, y, iy)

View file

@ -15,7 +15,7 @@
*/
#ifndef INLINE_KERNEL_SINDF
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_sinf.c,v 1.16 2009/06/03 08:16:34 ed Exp $");
#endif

View file

@ -11,7 +11,7 @@
*/
/* INDENT OFF */
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_tan.c,v 1.13 2008/02/22 02:30:35 das Exp $");
/* __kernel_tan( x, y, k )

View file

@ -14,7 +14,7 @@
*/
#ifndef INLINE_KERNEL_TANDF
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/k_tanf.c,v 1.23 2009/06/03 08:16:34 ed Exp $");
#endif

View file

@ -17,31 +17,8 @@
#ifndef _MATH_PRIVATE_H_
#define _MATH_PRIVATE_H_
#include <sys/types.h>
#ifdef __APPLE__
#include <machine/endian.h>
#ifdef __arm__
#if defined(__VFP_FP__)
#define IEEE_WORD_ORDER BYTE_ORDER
#else
#define IEEE_WORD_ORDER BIG_ENDIAN
#endif
#else /* __arm__ */
#define IEEE_WORD_ORDER BYTE_ORDER
#endif
#endif
#ifdef __linux__
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define IEEE_WORD_ORDER LITTLE_ENDIAN
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
#define IEEE_WORD_ORDER BIG_ENDIAN
#endif
#endif
#include "types-compat.h"
#include "fpmath.h"
#include <complex.h>
/*
@ -62,7 +39,7 @@
* ints.
*/
#if IEEE_WORD_ORDER == BIG_ENDIAN
#if _IEEE_WORD_ORDER == _BIG_ENDIAN
typedef union
{
@ -80,7 +57,7 @@ typedef union
#endif
#if IEEE_WORD_ORDER == LITTLE_ENDIAN
#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN
typedef union
{

View file

@ -17,20 +17,8 @@
#ifndef _MATH_H_
#define _MATH_H_
#include <sys/cdefs.h>
#ifdef __APPLE__
#include <sys/_types.h>
#include <machine/_limits.h>
#endif
#ifdef __linux__
/* Not sure what to do about __pure2 on linux */
#define __pure2
#include <sys/types.h>
#include <limits.h>
#endif
#include "cdefs-compat.h"
#include "types-compat.h"
/*
* ANSI/POSIX
@ -103,7 +91,7 @@ extern const union __nan_un {
((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
: (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
: __fpclassifyl(x))
#define isfinite(x) \
((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
: (sizeof (x) == sizeof (double)) ? __isfinite(x) \
@ -503,5 +491,4 @@ long double truncl(long double);
#endif /* __ISO_C_VISIBLE >= 1999 */
__END_DECLS
#endif /* !_MATH_H_ */

View file

@ -10,7 +10,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_asinh.c,v 1.9 2008/02/22 02:30:35 das Exp $");
/* asinh(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_asinhf.c,v 1.9 2008/02/22 02:30:35 das Exp $");
#include "openlibm.h"

View file

@ -10,7 +10,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_atan.c,v 1.13 2011/02/10 07:37:50 das Exp $");
/* atan(x)

View file

@ -13,7 +13,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_atanf.c,v 1.10 2008/08/01 01:24:25 das Exp $");
#include "openlibm.h"

View file

@ -11,7 +11,7 @@
* ====================================================
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_atanl.c,v 1.1 2008/07/31 22:41:26 das Exp $");
/*

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_carg.c,v 1.1 2007/12/12 23:43:51 das Exp $");
#include <complex.h>

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_cargf.c,v 1.1 2007/12/12 23:43:51 das Exp $");
#include <complex.h>

View file

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_cargl.c,v 1.1 2008/07/31 22:41:26 das Exp $");
#include <complex.h>

View file

@ -12,7 +12,7 @@
* Optimized by Bruce D. Evans.
*/
#include <sys/cdefs.h>
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_cbrt.c,v 1.17 2011/03/12 16:50:39 kargl Exp $");
#include "openlibm.h"

Some files were not shown because too many files have changed in this diff Show more