1 |
dragonheart 08/04/01 15:38:04 |
2 |
|
3 |
Added: ndebug.patch |
4 |
Log: |
5 |
patch to work with NDEBUG thanks to Guenther Brunthaler bug #205269. QA improvements thanks to Jakub. removed old versions |
6 |
(Portage version: 2.1.4.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-editors/lfhex/files/ndebug.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/lfhex/files/ndebug.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/lfhex/files/ndebug.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: ndebug.patch |
15 |
=================================================================== |
16 |
Patches lfhex to compile fine with -DNDEBUG (which is typically used to |
17 |
compile release versions without debugging information). |
18 |
|
19 |
The original version made an essential function call within an assert() |
20 |
statement - but defining NDEBUG makes any assert statements into no-ops. |
21 |
|
22 |
Patch written 2008 by Guenther Brunthaler <gb_about_gnu@×××.net> |
23 |
Index: src/reader.cpp |
24 |
=================================================================== |
25 |
--- src.orig/reader.cpp |
26 |
+++ src/reader.cpp |
27 |
@@ -278,7 +278,11 @@ uchar Reader::operator[] (off_t offset) |
28 |
"attempt to access past end of file"); |
29 |
|
30 |
off_t page_idx = offset/_pageSize; |
31 |
+ #ifdef NDEBUG |
32 |
+ (void)loadPage( page_idx ); |
33 |
+ #else |
34 |
assert( loadPage( page_idx ) ); |
35 |
+ #endif |
36 |
return _data[page_idx][ offset%_pageSize ]; |
37 |
} |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
-- |
43 |
gentoo-commits@l.g.o mailing list |