summaryrefslogtreecommitdiff
path: root/libjava/classpath/native/fdlibm
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/native/fdlibm')
-rw-r--r--libjava/classpath/native/fdlibm/Makefile.am4
-rw-r--r--libjava/classpath/native/fdlibm/Makefile.in14
-rw-r--r--libjava/classpath/native/fdlibm/fdlibm.h8
-rw-r--r--libjava/classpath/native/fdlibm/ieeefp.h5
-rw-r--r--libjava/classpath/native/fdlibm/java-assert.h40
-rw-r--r--libjava/classpath/native/fdlibm/mprec.c10
-rw-r--r--libjava/classpath/native/fdlibm/mprec.h28
-rw-r--r--libjava/classpath/native/fdlibm/namespace.h3
8 files changed, 32 insertions, 80 deletions
diff --git a/libjava/classpath/native/fdlibm/Makefile.am b/libjava/classpath/native/fdlibm/Makefile.am
index e3e3eecd2b7..545b0f86d59 100644
--- a/libjava/classpath/native/fdlibm/Makefile.am
+++ b/libjava/classpath/native/fdlibm/Makefile.am
@@ -15,7 +15,6 @@ libfdlibm_la_SOURCES = \
e_sqrt.c \
fdlibm.h \
ieeefp.h \
- java-assert.h \
k_cos.c \
k_rem_pio2.c \
k_sin.c \
@@ -44,7 +43,8 @@ libfdlibm_la_SOURCES = \
w_log.c \
w_pow.c \
w_remainder.c \
- w_sqrt.c
+ w_sqrt.c \
+ namespace.h
AM_LDFLAGS = @CLASSPATH_MODULE@
diff --git a/libjava/classpath/native/fdlibm/Makefile.in b/libjava/classpath/native/fdlibm/Makefile.in
index 5d53fa66bc4..b58bb6326d3 100644
--- a/libjava/classpath/native/fdlibm/Makefile.in
+++ b/libjava/classpath/native/fdlibm/Makefile.in
@@ -44,10 +44,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
- $(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/acinclude.m4 \
+ $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -167,6 +168,7 @@ JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
+JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@@ -287,7 +289,6 @@ libfdlibm_la_SOURCES = \
e_sqrt.c \
fdlibm.h \
ieeefp.h \
- java-assert.h \
k_cos.c \
k_rem_pio2.c \
k_sin.c \
@@ -316,7 +317,8 @@ libfdlibm_la_SOURCES = \
w_log.c \
w_pow.c \
w_remainder.c \
- w_sqrt.c
+ w_sqrt.c \
+ namespace.h
AM_LDFLAGS = @CLASSPATH_MODULE@
all: all-am
diff --git a/libjava/classpath/native/fdlibm/fdlibm.h b/libjava/classpath/native/fdlibm/fdlibm.h
index 156a03c1e45..13ee449d78e 100644
--- a/libjava/classpath/native/fdlibm/fdlibm.h
+++ b/libjava/classpath/native/fdlibm/fdlibm.h
@@ -24,6 +24,8 @@
/* GCJ LOCAL: Include files. */
#include "ieeefp.h"
+/* CLASSPATH LOCAL: */
+#include "namespace.h"
#include "mprec.h"
@@ -93,7 +95,11 @@ extern double erf __P((double));
extern double erfc __P((double));
extern double gamma __P((double));
extern double hypot __P((double, double));
-extern int isnan __P((double));
+
+#if !defined(isnan) && !defined(HAVE_ISNAN)
+#define isnan(x) ((x) != (x))
+#endif
+
extern int finite __P((double));
extern double j0 __P((double));
extern double j1 __P((double));
diff --git a/libjava/classpath/native/fdlibm/ieeefp.h b/libjava/classpath/native/fdlibm/ieeefp.h
index 405baab5840..1dda99b3280 100644
--- a/libjava/classpath/native/fdlibm/ieeefp.h
+++ b/libjava/classpath/native/fdlibm/ieeefp.h
@@ -123,9 +123,8 @@
#define __IEEE_LITTLE_ENDIAN
#endif
-#if defined (__PPC__) || defined (__ppc__) || defined (__ppc64__)
-#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) \
- || defined (__APPLE__)
+#if defined (__PPC__) || defined (__ppc__) || defined (__powerpc__) || defined (__ppc64__)
+#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) || defined (__BIG_ENDIAN__)|| defined (__APPLE__)
#define __IEEE_BIG_ENDIAN
#else
#if (defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN) || (defined(__sun__) && __sun__) || (defined(__WIN32__) && __WIN32__)
diff --git a/libjava/classpath/native/fdlibm/java-assert.h b/libjava/classpath/native/fdlibm/java-assert.h
deleted file mode 100644
index ad512ad137a..00000000000
--- a/libjava/classpath/native/fdlibm/java-assert.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* java-assert.h - Header file holding assertion definitions. -*- c++ -*- */
-
-/* Copyright (C) 1998, 1999 Free Software Foundation
-
- This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-details. */
-
-#ifndef __JAVA_ASSERT_H__
-#define __JAVA_ASSERT_H__
-
-#include <config.h>
-
-/* This is a libgcj implementation header. */
-
-void _Jv_Abort (const char *, const char *, int, const char *)
- __attribute__ ((__noreturn__));
-
-#ifdef DEBUG
-#define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message)
-
-#define JvAssertMessage(Expr, Message) \
- do { if (! (Expr)) _Jv_AssertDoCall (Message); } while (0)
-#define JvAssert(Expr) \
- do { if (! (Expr)) _Jv_AssertDoCall (# Expr); } while (0)
-
-#define JvFail(Message) _Jv_AssertDoCall (Message)
-
-#else /* DEBUG */
-
-#define _Jv_AssertDoCall(Message)
-#define JvAssertMessage(Expr, Message)
-#define JvAssert(Expr)
-#define JvFail(Message) _Jv_Abort (0, 0, 0, Message)
-
-#endif /* not DEBUG */
-
-#endif /* __JAVA_ASSERT_H__ */
diff --git a/libjava/classpath/native/fdlibm/mprec.c b/libjava/classpath/native/fdlibm/mprec.c
index 00679ed3918..0badf60c438 100644
--- a/libjava/classpath/native/fdlibm/mprec.c
+++ b/libjava/classpath/native/fdlibm/mprec.c
@@ -80,9 +80,9 @@
* down depends on the machine and the number being converted.
*/
+#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include <java-assert.h>
#include "mprec.h"
/* reent.c knows this value */
@@ -97,12 +97,14 @@ _DEFUN (Balloc, (ptr, k), struct _Jv_reent *ptr _AND int k)
int i = 0;
int j = 1;
- JvAssert ((1 << k) < MAX_BIGNUM_WDS);
+ /* FIXME - assert disabled because of PR classpath/23863
+ * assert ((1 << k) < MAX_BIGNUM_WDS);
+ */
while ((ptr->_allocation_map & j) && i < MAX_BIGNUMS)
i++, j <<= 1;
- JvAssert (i < MAX_BIGNUMS);
+ assert (i < MAX_BIGNUMS);
if (i >= MAX_BIGNUMS)
return NULL;
@@ -124,7 +126,7 @@ _DEFUN (Bfree, (ptr, v), struct _Jv_reent *ptr _AND _Jv_Bigint * v)
i = v - ptr->_freelist;
- JvAssert (i >= 0 && i < MAX_BIGNUMS);
+ assert (i >= 0 && i < MAX_BIGNUMS);
if (i >= 0 && i < MAX_BIGNUMS)
ptr->_allocation_map &= ~ (1 << i);
diff --git a/libjava/classpath/native/fdlibm/mprec.h b/libjava/classpath/native/fdlibm/mprec.h
index f250619b022..cd8f928a838 100644
--- a/libjava/classpath/native/fdlibm/mprec.h
+++ b/libjava/classpath/native/fdlibm/mprec.h
@@ -30,13 +30,10 @@
#define __CLASSPATH_MPREC_H__
#include <config.h>
+#include "config-int.h"
#include "ieeefp.h"
-
-#if defined HAVE_STDINT_H
-#include <stdint.h>
-#elif defined HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
+/* CLASSPATH LOCAL */
+#include "namespace.h"
#if defined HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -50,24 +47,6 @@
extern "C" {
#endif
-/* ISO C99 int type declarations */
-
-#if !defined HAVE_INT32_DEFINED && defined HAVE_BSD_INT32_DEFINED
-typedef u_int32_t uint32_t;
-#endif
-
-#if !defined HAVE_BSD_INT32_DEFINED && !defined HAVE_INT32_DEFINED
-/* FIXME this could have problems with systems that don't define SI to be 4 */
-typedef int int32_t __attribute__((mode(SI)));
-
-/* This is a blatant hack: on Solaris 2.5, pthread.h defines uint32_t
- in pthread.h, which we sometimes include. We protect our
- definition the same way Solaris 2.5 does, to avoid redefining it. */
-# ifndef _UINT32_T
-typedef unsigned int uint32_t __attribute__((mode(SI)));
-# endif
-#endif
-
/* These typedefs are true for the targets running Java. */
#ifdef __IEEE_LITTLE_ENDIAN
@@ -84,6 +63,7 @@ typedef unsigned int uint32_t __attribute__((mode(SI)));
#ifdef DEBUG
#include "stdio.h"
+#include <stdlib.h>
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
#endif
diff --git a/libjava/classpath/native/fdlibm/namespace.h b/libjava/classpath/native/fdlibm/namespace.h
new file mode 100644
index 00000000000..02da970d0c0
--- /dev/null
+++ b/libjava/classpath/native/fdlibm/namespace.h
@@ -0,0 +1,3 @@
+/* GCJ LOCAL We don't use the renaming here, so this file is empty for us.
+ * Warning ! This is a generated file. Use build_mathnamespace to regenerate it
+ */