aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_assert.h')
-rw-r--r--src/microhttpd/mhd_assert.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/microhttpd/mhd_assert.h b/src/microhttpd/mhd_assert.h
index e99632d0..427070eb 100644
--- a/src/microhttpd/mhd_assert.h
+++ b/src/microhttpd/mhd_assert.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2017 Karlson2k (Evgeny Grin) 3 Copyright (C) 2017-2021 Karlson2k (Evgeny Grin)
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
@@ -23,10 +23,17 @@
23 * @author Karlson2k (Evgeny Grin) 23 * @author Karlson2k (Evgeny Grin)
24 */ 24 */
25 25
26/* Unlike POSIX version of 'assert.h', MHD version of 'assert' header
27 * does not allow multiple redefinition of 'mhd_assert' macro within single
28 * souce file. */
26#ifndef MHD_ASSERT_H 29#ifndef MHD_ASSERT_H
27#define MHD_ASSERT_H 1 30#define MHD_ASSERT_H 1
28 31
29#include "mhd_options.h" 32#include "mhd_options.h"
33
34#if ! deifned(_DEBUG) && ! defined(NDEBUG)
35#define NDEBUG 1 /* Use NDEBUG by default */
36#endif /* !_DEBUG && !NDEBUG */
30#ifdef NDEBUG 37#ifdef NDEBUG
31# define mhd_assert(ignore) ((void) 0) 38# define mhd_assert(ignore) ((void) 0)
32#else /* _DEBUG */ 39#else /* _DEBUG */