Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2005-02-11 10:17:00 +0300
committerDanny Smith <dannysmith@users.sourceforge.net>2005-02-11 10:17:00 +0300
commitecb313cceeca1a6345ca7fcb89d015de48d3d507 (patch)
treee00de098dfbfc2304a8ecf6f49f5602565ae6ac8 /winsup/mingw
parente2a12d9f7d2dd9513ee90f52634cf74e70514718 (diff)
* include/assert.h; Remove header guard. undef assert macro.
(_assert): Use __MINGW_ATTRIB_NORETURN define.
Diffstat (limited to 'winsup/mingw')
-rw-r--r--winsup/mingw/ChangeLog5
-rw-r--r--winsup/mingw/include/assert.h20
2 files changed, 13 insertions, 12 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 00d36d677..8b5d15f54 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-11 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/assert.h; Remove header guard. #undef assert macro.
+ (_assert): Use __MINGW_ATTRIB_NORETURN define.
+
2005-02-11 Gregory W. Chicares <chicares@cox.net>
Danny Smith <dannysmith@users.sourceforge.net>
diff --git a/winsup/mingw/include/assert.h b/winsup/mingw/include/assert.h
index d33c9a8a7..9d825c9a2 100644
--- a/winsup/mingw/include/assert.h
+++ b/winsup/mingw/include/assert.h
@@ -8,20 +8,22 @@
*
*/
-#ifndef _ASSERT_H_
-#define _ASSERT_H_
+/* We should be able to include this file multiple times to allow the assert
+ macro to be enabled/disabled for different parts of code. So don't add a
+ header guard. */
+
+#ifndef RC_INVOKED
/* All the headers include this file. */
#include <_mingw.h>
-#ifndef RC_INVOKED
+#undef assert
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NDEBUG
-
/*
* If not debugging, assert does nothing.
*/
@@ -33,16 +35,13 @@ extern "C" {
* CRTDLL nicely supplies a function which does the actual output and
* call to abort.
*/
-_CRTIMP void __cdecl _assert (const char*, const char*, int)
-#ifdef __GNUC__
- __attribute__ ((noreturn))
-#endif
- ;
+_CRTIMP void __cdecl _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
/*
* Definition of the assert macro.
*/
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
+
#endif /* NDEBUG */
#ifdef __cplusplus
@@ -50,6 +49,3 @@ _CRTIMP void __cdecl _assert (const char*, const char*, int)
#endif
#endif /* Not RC_INVOKED */
-
-#endif /* Not _ASSERT_H_ */
-