ASSERT fixes.
This commit is contained in:
parent
d8077ab007
commit
2ffd727531
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.17 1998/02/26 04:29:36 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.18 1998/04/06 17:27:06 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#include <access/istrat.h>
|
#include <access/istrat.h>
|
||||||
#include <fmgr.h>
|
#include <fmgr.h>
|
||||||
|
|
||||||
#ifndef NO_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
|
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
|
||||||
static bool
|
static bool
|
||||||
StrategyExpressionIsValid(StrategyExpression expression,
|
StrategyExpressionIsValid(StrategyExpression expression,
|
||||||
|
@ -113,7 +113,7 @@ AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
|
||||||
maxAttributeNumber * maxStrategyNumber * sizeof(ScanKeyData);
|
maxAttributeNumber * maxStrategyNumber * sizeof(ScanKeyData);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
/*
|
/*
|
||||||
* StrategyTransformMapIsValid is now a macro in istrat.h -cim 4/27/91
|
* StrategyTransformMapIsValid is now a macro in istrat.h -cim 4/27/91
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.6 1997/09/08 02:22:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.7 1998/04/06 17:27:11 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -84,7 +84,7 @@ FixedStackPush(FixedStack stack, Pointer pointer)
|
||||||
stack->top = item;
|
stack->top = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
/*
|
/*
|
||||||
* FixedStackContains --
|
* FixedStackContains --
|
||||||
* True iff ordered stack contains given element.
|
* True iff ordered stack contains given element.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.17 1998/02/26 04:35:46 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.18 1998/04/06 17:27:25 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -511,7 +511,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
|
||||||
if (!BindingTable)
|
if (!BindingTable)
|
||||||
{
|
{
|
||||||
/* Assert() is a macro now. substitutes inside quotes. */
|
/* Assert() is a macro now. substitutes inside quotes. */
|
||||||
#ifndef NO_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
char *strname = "BindingTable";
|
char *strname = "BindingTable";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -877,7 +877,7 @@ echo "configure:876: checking setting ASSERT CHECKING" >&5
|
||||||
if test "${enable_cassert+set}" = set; then
|
if test "${enable_cassert+set}" = set; then
|
||||||
enableval="$enable_cassert"
|
enableval="$enable_cassert"
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define NO_ASSERT_CHECKING 1
|
#define USE_ASSERT_CHECKING 1
|
||||||
EOF
|
EOF
|
||||||
echo "$ac_t""enabled" 1>&6
|
echo "$ac_t""enabled" 1>&6
|
||||||
else
|
else
|
||||||
|
|
|
@ -280,7 +280,7 @@ AC_MSG_CHECKING(setting ASSERT CHECKING)
|
||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
cassert,
|
cassert,
|
||||||
[ --enable-cassert enable assertion checks (debugging) ],
|
[ --enable-cassert enable assertion checks (debugging) ],
|
||||||
AC_DEFINE(NO_ASSERT_CHECKING) AC_MSG_RESULT(enabled),
|
AC_DEFINE(USE_ASSERT_CHECKING) AC_MSG_RESULT(enabled),
|
||||||
AC_MSG_RESULT(disabled)
|
AC_MSG_RESULT(disabled)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: c.h,v 1.38 1998/03/31 15:53:39 momjian Exp $
|
* $Id: c.h,v 1.39 1998/04/06 17:27:49 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -583,12 +583,12 @@ typedef struct Exception
|
||||||
} Exception;
|
} Exception;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NO_ASSERT_CHECKING, if defined, turns off all the assertions.
|
* USE_ASSERT_CHECKING, if defined, turns off all the assertions.
|
||||||
* - plai 9/5/90
|
* - plai 9/5/90
|
||||||
*
|
*
|
||||||
* It should _NOT_ be undef'ed in releases or in benchmark copies
|
* It should _NOT_ be undef'ed in releases or in benchmark copies
|
||||||
*
|
*
|
||||||
* #undef NO_ASSERT_CHECKING
|
* #undef USE_ASSERT_CHECKING
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -614,7 +614,7 @@ typedef struct Exception
|
||||||
&(exception), \
|
&(exception), \
|
||||||
(char*) NULL, __FILE__, __LINE__))))
|
(char*) NULL, __FILE__, __LINE__))))
|
||||||
|
|
||||||
#ifdef NO_ASSERT_CHECKING
|
#ifndef USE_ASSERT_CHECKING
|
||||||
#define Assert(condition)
|
#define Assert(condition)
|
||||||
#define AssertMacro(condition) true
|
#define AssertMacro(condition) true
|
||||||
#define AssertArg(condition)
|
#define AssertArg(condition)
|
||||||
|
@ -632,7 +632,7 @@ typedef struct Exception
|
||||||
#define AssertState(condition) \
|
#define AssertState(condition) \
|
||||||
Trap(!(condition), BadState)
|
Trap(!(condition), BadState)
|
||||||
|
|
||||||
#endif /* NO_ASSERT_CHECKING */
|
#endif /* USE_ASSERT_CHECKING */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LogTrap --
|
* LogTrap --
|
||||||
|
@ -655,7 +655,7 @@ typedef struct Exception
|
||||||
&(exception), \
|
&(exception), \
|
||||||
form printArgs, __FILE__, __LINE__))))
|
form printArgs, __FILE__, __LINE__))))
|
||||||
|
|
||||||
#ifdef NO_ASSERT_CHECKING
|
#ifndef USE_ASSERT_CHECKING
|
||||||
#define LogAssert(condition, printArgs)
|
#define LogAssert(condition, printArgs)
|
||||||
#define LogAssertMacro(condition, printArgs) true
|
#define LogAssertMacro(condition, printArgs) true
|
||||||
#define LogAssertArg(condition, printArgs)
|
#define LogAssertArg(condition, printArgs)
|
||||||
|
@ -673,7 +673,7 @@ typedef struct Exception
|
||||||
#define LogAssertState(condition, printArgs) \
|
#define LogAssertState(condition, printArgs) \
|
||||||
LogTrap(!(condition), BadState, printArgs)
|
LogTrap(!(condition), BadState, printArgs)
|
||||||
|
|
||||||
#endif /* NO_ASSERT_CHECKING */
|
#endif /* USE_ASSERT_CHECKING */
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* Section 8: Min, Max, Abs macros
|
* Section 8: Min, Max, Abs macros
|
||||||
|
|
|
@ -208,7 +208,7 @@ extern void srandom(int seed);
|
||||||
#undef CYR_RECODE
|
#undef CYR_RECODE
|
||||||
|
|
||||||
/* Set to 1 if you want to Disable ASSERT CHECKING */
|
/* Set to 1 if you want to Disable ASSERT CHECKING */
|
||||||
#undef NO_ASSERT_CHECKING
|
#undef USE_ASSERT_CHECKING
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Code below this point should not require changes
|
* Code below this point should not require changes
|
||||||
|
|
Loading…
Reference in New Issue