mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-27 04:09:31 +03:00
mhd_assert: ensure that either _DEBUG or NDEBUG is defined
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include <sys/param.h>
|
||||
#endif /* HAVE_SYS_PARAM_H */
|
||||
#include "mhd_send.h"
|
||||
#include "mhd_assert.h"
|
||||
|
||||
/**
|
||||
* Message to transmit when http 1.1 request is received
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
This file is part of libmicrohttpd
|
||||
Copyright (C) 2017 Karlson2k (Evgeny Grin)
|
||||
Copyright (C) 2017-2021 Karlson2k (Evgeny Grin)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
@@ -23,10 +23,17 @@
|
||||
* @author Karlson2k (Evgeny Grin)
|
||||
*/
|
||||
|
||||
/* Unlike POSIX version of 'assert.h', MHD version of 'assert' header
|
||||
* does not allow multiple redefinition of 'mhd_assert' macro within single
|
||||
* souce file. */
|
||||
#ifndef MHD_ASSERT_H
|
||||
#define MHD_ASSERT_H 1
|
||||
|
||||
#include "mhd_options.h"
|
||||
|
||||
#if ! deifned(_DEBUG) && ! defined(NDEBUG)
|
||||
#define NDEBUG 1 /* Use NDEBUG by default */
|
||||
#endif /* !_DEBUG && !NDEBUG */
|
||||
#ifdef NDEBUG
|
||||
# define mhd_assert(ignore) ((void) 0)
|
||||
#else /* _DEBUG */
|
||||
|
||||
Reference in New Issue
Block a user