[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Replaced use of JvAssert by assert and removed java-as
From: |
Dalibor Topic |
Subject: |
[cp-patches] FYI: Replaced use of JvAssert by assert and removed java-assert.h |
Date: |
Fri, 06 Jan 2006 02:33:27 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051013) |
Hi all,
I've cleaned up a bit in fdlibm, removing the use of gcj-specific
java-assert.h headr and replaced it by plain asserts. The former code
caused problems on platforms like Cygwin when built in debug mode, as it
tried to link to a method that does not exist in GNU Classpath.
cheers,
dalibor topic
2006-01-06 Dalibor Topic <address@hidden>
* native/fdlibm/Makefile.am (libfdlibm_la_SOURCES): Removed
java-assert.h.
* native/fdlibm/java-assert.h: Removed file.
* native/fdlibm/mprec.c: Include assert.h. Don't include
java-assert.h.
Replaced use of JvAssert by assert.
Index: native/fdlibm/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/native/fdlibm/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- native/fdlibm/Makefile.am 18 Dec 2005 02:11:41 -0000 1.9
+++ native/fdlibm/Makefile.am 6 Jan 2006 01:23:56 -0000
@@ -15,7 +15,6 @@
e_sqrt.c \
fdlibm.h \
ieeefp.h \
- java-assert.h \
k_cos.c \
k_rem_pio2.c \
k_sin.c \
Index: native/fdlibm/java-assert.h
===================================================================
RCS file: native/fdlibm/java-assert.h
diff -N native/fdlibm/java-assert.h
--- native/fdlibm/java-assert.h 5 Oct 2005 19:18:59 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -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__ */
Index: native/fdlibm/mprec.c
===================================================================
RCS file: /sources/classpath/classpath/native/fdlibm/mprec.c,v
retrieving revision 1.5
diff -u -r1.5 mprec.c
--- native/fdlibm/mprec.c 22 May 2005 01:44:19 -0000 1.5
+++ native/fdlibm/mprec.c 6 Jan 2006 01:23:56 -0000
@@ -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,12 @@
int i = 0;
int j = 1;
- JvAssert ((1 << k) < MAX_BIGNUM_WDS);
+ 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 +124,7 @@
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);
- [cp-patches] FYI: Replaced use of JvAssert by assert and removed java-assert.h,
Dalibor Topic <=