2
* The contents of this file are subject to the Interbase Public
3
* License Version 1.0 (the "License"); you may not use this file
4
* except in compliance with the License. You may obtain a copy
5
* of the License at http://www.Inprise.com/IPL.html
7
* Software distributed under the License is distributed on an
8
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
9
* or implied. See the License for the specific language governing
10
* rights and limitations under the License.
12
* The Original Code was created by Inprise Corporation
13
* and its predecessors. Portions created by Inprise Corporation are
14
* Copyright (C) Inprise Corporation.
16
* All Rights Reserved.
17
* Contributor(s): ______________________________________.
18
* CVC: Do not override local fb_assert like the ones in gpre and dsql.
20
#ifndef JRD_GDSASSERT_H
21
#define JRD_GDSASSERT_H
24
#include "../jrd/gds_proto.h"
28
#include <stdlib.h> // abort()
33
/* fb_assert() has been made into a generic version that works across
34
* gds components. Previously, the fb_assert() defined here was only
35
* usable within the engine.
36
* 1996-Feb-09 David Schnepper
39
#define FB_GDS_ASSERT_FAILURE_STRING "GDS Assertion failure: %s %"LINEFORMAT"\n"
43
#if !defined(fb_assert)
44
#define fb_assert(ex) {if (!(ex)) {gds__log (FB_GDS_ASSERT_FAILURE_STRING, __FILE__, __LINE__); abort();}}
45
#define fb_assert_continue(ex) {if (!(ex)) {gds__log (FB_GDS_ASSERT_FAILURE_STRING, __FILE__, __LINE__);}}
50
#if !defined(fb_assert)
51
#define fb_assert(ex) {if (!(ex)) {fprintf (stderr, FB_GDS_ASSERT_FAILURE_STRING, __FILE__, __LINE__); abort();}}
52
#define fb_assert_continue(ex) {if (!(ex)) {fprintf (stderr, FB_GDS_ASSERT_FAILURE_STRING, __FILE__, __LINE__);}}
59
#define fb_assert(ex) // nothing
60
#define fb_assert_continue(ex) // nothing
64
#endif // JRD_GDSASSERT_H