Skip to content

Commit 2ffd727

Browse files
committed
ASSERT fixes.
1 parent d8077ab commit 2ffd727

File tree

7 files changed

+31
-31
lines changed

7 files changed

+31
-31
lines changed

src/backend/access/index/istrat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.17 1998/02/26 04:29:36 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.18 1998/04/06 17:27:06 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -26,7 +26,7 @@
2626
#include <access/istrat.h>
2727
#include <fmgr.h>
2828

29-
#ifndef NO_ASSERT_CHECKING
29+
#ifdef USE_ASSERT_CHECKING
3030
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
3131
static bool
3232
StrategyExpressionIsValid(StrategyExpression expression,
@@ -113,7 +113,7 @@ AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
113113
maxAttributeNumber * maxStrategyNumber * sizeof(ScanKeyData);
114114
}
115115

116-
#ifndef NO_ASSERT_CHECKING
116+
#ifdef USE_ASSERT_CHECKING
117117
/*
118118
* StrategyTransformMapIsValid is now a macro in istrat.h -cim 4/27/91
119119
*/

src/backend/lib/fstack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.6 1997/09/08 02:22:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.7 1998/04/06 17:27:11 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -84,7 +84,7 @@ FixedStackPush(FixedStack stack, Pointer pointer)
8484
stack->top = item;
8585
}
8686

87-
#ifndef NO_ASSERT_CHECKING
87+
#ifdef USE_ASSERT_CHECKING
8888
/*
8989
* FixedStackContains --
9090
* True iff ordered stack contains given element.

src/backend/storage/ipc/shmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.17 1998/02/26 04:35:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.18 1998/04/06 17:27:25 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -511,7 +511,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
511511
if (!BindingTable)
512512
{
513513
/* Assert() is a macro now. substitutes inside quotes. */
514-
#ifndef NO_ASSERT_CHECKING
514+
#ifdef USE_ASSERT_CHECKING
515515
char *strname = "BindingTable";
516516

517517
#endif

src/configure

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ ac_default_prefix=/usr/local
1313
# Any additions from configure.in:
1414
ac_default_prefix=/usr/local/pgsql
1515
ac_help="$ac_help
16-
--with-includes=DIR site header files for tk/tcl, etc in DIR"
16+
--with-includes=DIR site header files for tk/tcl, etc in DIR"
1717
ac_help="$ac_help
18-
--with-libraries=DIR site library directories for tk/tcl, etc in DIR"
18+
--with-libraries=DIR site library directories for tk/tcl, etc in DIR"
1919
ac_help="$ac_help
20-
--enable-locale enable locale support "
20+
--enable-locale enable locale support "
2121
ac_help="$ac_help
22-
--enable-recode enable cyrillic recode support "
22+
--enable-recode enable cyrillic recode support "
2323
ac_help="$ac_help
2424
--with-pgport=<portnum> change default startup port "
2525
ac_help="$ac_help
26-
--with-tcl use tcl "
26+
--with-tcl use tcl "
2727
ac_help="$ac_help
28-
--with-perl use perl "
28+
--with-perl use perl "
2929
ac_help="$ac_help
30-
--enable-cassert enable assertion checks (debugging) "
30+
--enable-cassert enable assertion checks (debugging) "
3131
ac_help="$ac_help
3232
--with-x use the X Window System"
3333

@@ -877,7 +877,7 @@ echo "configure:876: checking setting ASSERT CHECKING" >&5
877877
if test "${enable_cassert+set}" = set; then
878878
enableval="$enable_cassert"
879879
cat >> confdefs.h <<\EOF
880-
#define NO_ASSERT_CHECKING 1
880+
#define USE_ASSERT_CHECKING 1
881881
EOF
882882
echo "$ac_t""enabled" 1>&6
883883
else

src/configure.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ LIBS=`grep '^LIBS:' $TEMPLATE | awk -F: '{print $2}'`
142142

143143

144144
AC_ARG_WITH(includes,
145-
[ --with-includes=DIR site header files for tk/tcl, etc in DIR],
145+
[ --with-includes=DIR site header files for tk/tcl, etc in DIR],
146146
[
147147
case "$withval" in
148148
"" | y | ye | yes | n | no)
@@ -163,7 +163,7 @@ if test "$INCLUDE_DIRS"; then
163163
fi
164164

165165
AC_ARG_WITH(libraries,
166-
[ --with-libraries=DIR site library directories for tk/tcl, etc in DIR],
166+
[ --with-libraries=DIR site library directories for tk/tcl, etc in DIR],
167167
[
168168
case "$withval" in
169169
"" | y | ye | yes | n | no)
@@ -191,7 +191,7 @@ dnl It defaults to disabled
191191
AC_MSG_CHECKING(setting USE_LOCALE)
192192
AC_ARG_ENABLE(
193193
locale,
194-
[ --enable-locale enable locale support ],
194+
[ --enable-locale enable locale support ],
195195
AC_DEFINE(USE_LOCALE) AC_MSG_RESULT(enabled),
196196
AC_MSG_RESULT(disabled)
197197
)
@@ -204,7 +204,7 @@ dnl It defaults to disabled
204204
AC_MSG_CHECKING(setting CYR_RECODE)
205205
AC_ARG_ENABLE(
206206
recode,
207-
[ --enable-recode enable cyrillic recode support ],
207+
[ --enable-recode enable cyrillic recode support ],
208208
AC_DEFINE(CYR_RECODE) AC_MSG_RESULT(enabled),
209209
AC_MSG_RESULT(disabled)
210210
)
@@ -223,7 +223,7 @@ dnl We exclude tcl support unless we override it with --with-tcl
223223
AC_MSG_CHECKING(setting USE_TCL)
224224
AC_ARG_WITH(
225225
tcl,
226-
[ --with-tcl use tcl ],
226+
[ --with-tcl use tcl ],
227227
USE_TCL=true; AC_MSG_RESULT(enabled),
228228
USE_TCL=false; AC_MSG_RESULT(disabled)
229229
)
@@ -255,7 +255,7 @@ dnl We exclude perl support unless we override it with --with-perl
255255
AC_MSG_CHECKING(setting USE_PERL)
256256
AC_ARG_WITH(
257257
perl,
258-
[ --with-perl use perl ],
258+
[ --with-perl use perl ],
259259
USE_PERL=true; AC_MSG_RESULT(enabled),
260260
USE_PERL=false; AC_MSG_RESULT(disabled)
261261
)
@@ -279,8 +279,8 @@ dnl We need some explanatory text here.
279279
AC_MSG_CHECKING(setting ASSERT CHECKING)
280280
AC_ARG_ENABLE(
281281
cassert,
282-
[ --enable-cassert enable assertion checks (debugging) ],
283-
AC_DEFINE(NO_ASSERT_CHECKING) AC_MSG_RESULT(enabled),
282+
[ --enable-cassert enable assertion checks (debugging) ],
283+
AC_DEFINE(USE_ASSERT_CHECKING) AC_MSG_RESULT(enabled),
284284
AC_MSG_RESULT(disabled)
285285
)
286286

src/include/c.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: c.h,v 1.38 1998/03/31 15:53:39 momjian Exp $
10+
* $Id: c.h,v 1.39 1998/04/06 17:27:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -583,12 +583,12 @@ typedef struct Exception
583583
} Exception;
584584

585585
/*
586-
* NO_ASSERT_CHECKING, if defined, turns off all the assertions.
586+
* USE_ASSERT_CHECKING, if defined, turns off all the assertions.
587587
* - plai 9/5/90
588588
*
589589
* It should _NOT_ be undef'ed in releases or in benchmark copies
590590
*
591-
* #undef NO_ASSERT_CHECKING
591+
* #undef USE_ASSERT_CHECKING
592592
*/
593593

594594
/*
@@ -614,7 +614,7 @@ typedef struct Exception
614614
&(exception), \
615615
(char*) NULL, __FILE__, __LINE__))))
616616

617-
#ifdef NO_ASSERT_CHECKING
617+
#ifndef USE_ASSERT_CHECKING
618618
#define Assert(condition)
619619
#define AssertMacro(condition) true
620620
#define AssertArg(condition)
@@ -632,7 +632,7 @@ typedef struct Exception
632632
#define AssertState(condition) \
633633
Trap(!(condition), BadState)
634634

635-
#endif /* NO_ASSERT_CHECKING */
635+
#endif /* USE_ASSERT_CHECKING */
636636

637637
/*
638638
* LogTrap --
@@ -655,7 +655,7 @@ typedef struct Exception
655655
&(exception), \
656656
form printArgs, __FILE__, __LINE__))))
657657

658-
#ifdef NO_ASSERT_CHECKING
658+
#ifndef USE_ASSERT_CHECKING
659659
#define LogAssert(condition, printArgs)
660660
#define LogAssertMacro(condition, printArgs) true
661661
#define LogAssertArg(condition, printArgs)
@@ -673,7 +673,7 @@ typedef struct Exception
673673
#define LogAssertState(condition, printArgs) \
674674
LogTrap(!(condition), BadState, printArgs)
675675

676-
#endif /* NO_ASSERT_CHECKING */
676+
#endif /* USE_ASSERT_CHECKING */
677677

678678
/* ----------------------------------------------------------------
679679
* Section 8: Min, Max, Abs macros

src/include/config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ extern void srandom(int seed);
208208
#undef CYR_RECODE
209209

210210
/* Set to 1 if you want to Disable ASSERT CHECKING */
211-
#undef NO_ASSERT_CHECKING
211+
#undef USE_ASSERT_CHECKING
212212

213213
/*
214214
* Code below this point should not require changes

0 commit comments

Comments
 (0)