diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/include/java-assert.h | |
download | cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.bz2 cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'libjava/include/java-assert.h')
-rw-r--r-- | libjava/include/java-assert.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libjava/include/java-assert.h b/libjava/include/java-assert.h new file mode 100644 index 000000000..1d3a49bfa --- /dev/null +++ b/libjava/include/java-assert.h @@ -0,0 +1,38 @@ +// java-assert.h - Header file holding assertion definitions. -*- c++ -*- + +/* Copyright (C) 1998, 1999, 2010 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__ + +// This is a libgcj implementation header. + +void _Jv_Abort (const char *, const char *, int, const char *) + __attribute__ ((__noreturn__)); + +#ifdef __GCJ_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 /* __GCJ_DEBUG */ + +#define _Jv_AssertDoCall(Message) +#define JvAssertMessage(Expr, Message) (void) sizeof (Expr) +#define JvAssert(Expr) (void) sizeof (Expr) +#define JvFail(Message) _Jv_Abort (0, 0, 0, Message) + +#endif /* not __GCJ_DEBUG */ + +#endif /* __JAVA_ASSERT_H__ */ |