This mail is an automated notification from the patch tracker of the project: The GNU Hurd.
/**************************************************************************/ [patch #3346] Latest Modifications: Changes by: Neal H. Walfield <[EMAIL PROTECTED]> 'Date: Fri 12/03/04 at 09:19 (GMT) What | Removed | Added --------------------------------------------------------------------------- Resolution | None | Applied Status | Open | Closed /**************************************************************************/ [patch #3346] Full Item Snapshot: URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=3346> Project: The GNU Hurd Submitted by: Neal H. Walfield On: Tue 09/07/04 at 14:29 Category: GNU Mach Priority: 3 - Low Resolution: Applied Privacy: Public Assigned to: None Originator Email: Status: Closed Summary: GNUMach: ifdef DEBUG -> ifndef NDEBUG Original Submission: I think it would be useful to turn asserts on when building GNU Mach. One way to go about doing this would be to define DEBUG when building. I think it might be useful, however, to be more like the posix interface and only disable asserts when NDEBUG is defined. This also helps get rid of some of the warnings: warning: extra tokens at end of #endif directive It also includes a small patch which fixes a bad assert (basically suggesting that no one has compiled GNU Mach with asserts turned on for the past few years). I used the attached shell script to automate the changes, however, I have verified all of the changes by hand and I have compiled the code (at least using my configuration which does not include all of the changed files). This patch has already proved useful for uncovering one bug and several potential more. (Patches and full explanations to follow as I get to them.) Thanks. for i in $(find . -type f -name '*.[chS]' -print0 | xargs -0 grep -E -l -e 'bDEBUGb') do sed -e 's/^(#[[:blank:]]*if[[:blank:]]*!?[[:blank:]]*)(DEBUG[[:blank:]]*)$/1!N2/g' -e 's/^(#[[:blank:]]*if[[:blank:]]*!?[[:blank:]]*defined[[:blank:]]*([[:blank:]]*)DEBUG)/1!NDEBUG)/g' -e 's/^(#[[:blank:]]*if)(def[[:blank:]]*!?)(DEBUG[[:blank:]]*)$/1n2N3/g' -e 's/^(#[[:blank:]]*(endif|else)[[:blank:]]+)(/*)?([[:blank:]]*!?)DEBUG([[:blank:]]**/)?[[:blank:]]*$/1 /* NDEBUG *//g' < $i > $i.tmp && mv $i.tmp $i done File Attachments ------------------- ------------------------------------------------------- Date: Tue 09/07/04 at 14:29 Name: debug.diff Size: 31.34KB By: neal http://savannah.gnu.org/patch/download.php?item_id=3346&item_file_id=3646 For detailed info, follow this link: <http://savannah.gnu.org/patch/?func=detailitem&item_id=3346> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-hurd