mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
common: Fix fallback code.
* common/logging.c (_log_assert): Fix the variant for compilers that do not support __FUNCTION__. * common/logging.h (_log_assert): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
0cc975d8a1
commit
bfd6a49012
@ -1007,7 +1007,7 @@ void
|
||||
_log_assert (const char *expr, const char *file, int line)
|
||||
{
|
||||
log_log (GPGRT_LOG_BUG, "Assertion \"%s\" failed (%s:%d)\n",
|
||||
file, line, func);
|
||||
expr, file, line);
|
||||
abort (); /* Never called; just to make the compiler happy. */
|
||||
}
|
||||
#endif /*!GPGRT_HAVE_MACRO_FUNCTION*/
|
||||
|
@ -62,7 +62,7 @@ estream_t log_get_stream (void);
|
||||
: _log_assert (#expr, __FILE__, __LINE__, __FUNCTION__))
|
||||
#else /*!GPGRT_HAVE_MACRO_FUNCTION*/
|
||||
void bug_at (const char *file, int line);
|
||||
void _log_assert (const char *expr, const char *file, int line;
|
||||
void _log_assert (const char *expr, const char *file, int line);
|
||||
# define BUG() bug_at( __FILE__ , __LINE__ )
|
||||
# define log_assert(expr) \
|
||||
((expr) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user