chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / debian / patches / any / local-asserth-decls.diff
1 # DP: Description: /usr/include/assert.h
2 # DP:   One must be allowed to include <assert.h> multiple times with different
3 # DP:   values for NDEBUG, so the file is not protected against multiple
4 # DP:   inclusions.  Unfortunately this means that the declarations for
5 # DP:   __assert_fail() and the like may occur multiple times in a compilation
6 # DP:   unit, causing gcc to issue a batch of warnings.
7 # DP:   I believe this can be fixed by protecting the declarations (but only
8 # DP:   those declarations) against repetition.
9 # DP: Author: Jeroen T. Vermeulen <jtv@xs4all.nl>
10 # DP: Upstream status: Not submitted
11 # DP: Status Details: Plan to submit
12 # DP: Date: 2003-01-01
13
14 ---
15  assert/assert.h |    3 +++
16  1 file changed, 3 insertions(+)
17
18 --- a/assert/assert.h
19 +++ b/assert/assert.h
20 @@ -63,6 +63,8 @@
21  
22  #else /* Not NDEBUG.  */
23  
24 +#ifndef _ASSERT_H_DECLS
25 +#define _ASSERT_H_DECLS
26  __BEGIN_DECLS
27  
28  /* This prints an "Assertion failed" message and aborts.  */
29 @@ -84,6 +86,7 @@
30  
31  
32  __END_DECLS
33 +#endif /* Not _ASSERT_H_DECLS */
34  
35  # define assert(expr)                                                  \
36    ((expr)                                                              \