summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--bogus/mach_assert.h2
-rw-r--r--i386/i386/debug.h9
-rw-r--r--kern/assert.h2
-rw-r--r--kern/debug.h6
-rw-r--r--linux/dev/glue/block.c1
-rw-r--r--util/debug.h6
7 files changed, 23 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 5db127c..e6a7080 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-11-22 Guillem Jover <guillem@hadrons.org>
+
+ * bogus/mach_assert.h: Change #ifdef DEBUG to #ifndef NDEBUG
+ for assert et al.
+ * kern/assert.h: Likewise.
+ * kern/debug.h: Likewise.
+ * util/debug.h: Likewise.
+
+ * i386/i386/debug.h: Move dump_ss definition out of [DEBUG].
+ * linux/dev/glue/block.c (rdwr_full): Remove invalid assert.
+
2004-09-07 Neal H. Walfield <neal@cs.uml.edu>
* linux/dev/glue/block.c (__brelse): Unconditionally kfree BH.
diff --git a/bogus/mach_assert.h b/bogus/mach_assert.h
index 5e5124a..2550197 100644
--- a/bogus/mach_assert.h
+++ b/bogus/mach_assert.h
@@ -1,4 +1,4 @@
-#ifdef DEBUG
+#ifndef NDEBUG
#define MACH_ASSERT 1
#else
#define MACH_ASSERT 0
diff --git a/i386/i386/debug.h b/i386/i386/debug.h
index 37b2d40..135af7e 100644
--- a/i386/i386/debug.h
+++ b/i386/i386/debug.h
@@ -23,6 +23,10 @@
#ifndef _I386_DEBUG_
#define _I386_DEBUG_
+/* Dump a saved state.
+ Probably a good idea to have this around
+ even when DEBUG isn't turned on. */
+void dump_ss(struct i386_saved_state *st);
#ifdef DEBUG
@@ -37,11 +41,6 @@
and all registers are saved. */
#ifndef ASSEMBLER
-/* Dump a saved state.
- Probably a good idea to have this around
- even when DEBUG isn't turned on. */
-void dump_ss(struct i386_saved_state *st);
-
#define DEBUG_TRACE _debug_trace(__FILE__,__LINE__)
/* Reset the debug trace buffer so it contains no valid entries. */
diff --git a/kern/assert.h b/kern/assert.h
index 26214e3..228f91c 100644
--- a/kern/assert.h
+++ b/kern/assert.h
@@ -31,7 +31,7 @@
#include <kern/macro_help.h>
-#ifdef DEBUG
+#ifndef NDEBUG
#define MACH_ASSERT 1
#endif
diff --git a/kern/debug.h b/kern/debug.h
index 0c4ddf2..526ccc6 100644
--- a/kern/debug.h
+++ b/kern/debug.h
@@ -30,7 +30,7 @@
#include <kern/assert.h> /*XXX*/
-#ifdef DEBUG
+#ifndef NDEBUG
#define here() printf("@ %s:%d\n", __FILE__, __LINE__)
#define message(args) ({ printf("@ %s:%d: ", __FILE__, __LINE__); printf args; printf("\n"); })
@@ -46,7 +46,7 @@
__FILE__, __LINE__, (p), (id), (p->struct_id)); \
})
-#else /* !DEBUG */
+#else /* NDEBUG */
#define otsan()
@@ -55,6 +55,6 @@
#define struct_id_denit(p)
#define struct_id_verify(p,id)
-#endif /* !DEBUG */
+#endif /* NDEBUG */
#endif /* _mach_debug__debug_ */
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index 5267474..87603d8 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -589,7 +589,6 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift)
struct buffer_head bhead[MAX_BUF], *bh, *bhp[MAX_BUF];
assert ((*off & BMASK) == 0);
- assert (*resid >= bsize);
nbuf = *resid >> bshift;
blk = *off >> bshift;
diff --git a/util/debug.h b/util/debug.h
index d61502b..7b2abb6 100644
--- a/util/debug.h
+++ b/util/debug.h
@@ -34,7 +34,7 @@
#include <mach/macro_help.h>
-#ifdef DEBUG
+#ifndef NDEBUG
extern void panic(const char *fmt, ...);
@@ -64,7 +64,7 @@ extern void panic(const char *fmt, ...);
__FILE__, __LINE__, (p), (id), (p->struct_id)); \
})
-#else !DEBUG
+#else /* NDEBUG */
#define otsan()
#define assert(v)
@@ -76,6 +76,6 @@ extern void panic(const char *fmt, ...);
#define struct_id_denit(p)
#define struct_id_verify(p,id)
-#endif !DEBUG
+#endif /* NDEBUG */
#endif _MACH_UTIL_DEBUG_H_