Automatically set the NDEBUG preprocessor macro unless SQLITE_DEBUG is set.
In this way, assert() statements become opt-in rather than opt-out. (CVS 2690)
FossilOrigin-Name: 2ec2bd85741e36e410f05ff34de430ffbcf51eea
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index e33d115..2c40786 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,12 +11,23 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.414 2005/09/10 15:28:09 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.415 2005/09/13 00:00:01 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
/*
+** Many people are failing to set -DNDEBUG=1 when compiling SQLite.
+** Setting NDEBUG makes the code smaller and run slower. So the following
+** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1
+** option is set. Thus NDEBUG becomes an opt-in rather than an opt-out
+** feature.
+*/
+#if !defined(NDEBUG) && defined(SQLITE_DEBUG)
+# define NDEBUG 1
+#endif
+
+/*
** These #defines should enable >2GB file support on Posix if the
** underlying operating system supports it. If the OS lacks
** large file support, or if the OS is windows, these should be no-ops.