2022-10-16 05:54:38 +00:00
|
|
|
/* $Id: macros.h,v 1.7 2022/10/16 06:03:56 nanard Exp $ */
|
2012-05-01 12:23:22 +00:00
|
|
|
/* MiniUPnP project
|
2022-10-16 05:54:38 +00:00
|
|
|
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
|
|
* (c) 2012-2022 Thomas Bernard
|
2012-05-01 12:23:22 +00:00
|
|
|
* This software is subject to the conditions detailed
|
|
|
|
* in the LICENCE file provided within the distribution */
|
|
|
|
|
2012-09-20 20:52:51 +00:00
|
|
|
#ifndef MACROS_H_INCLUDED
|
|
|
|
#define MACROS_H_INCLUDED
|
2012-05-01 12:23:22 +00:00
|
|
|
|
|
|
|
#define UNUSED(arg) (void)(arg)
|
|
|
|
|
2019-09-24 10:04:40 +00:00
|
|
|
#if defined(__GNUC__) && (__GNUC__ >= 7)
|
|
|
|
#define FALL_THROUGH __attribute__((fallthrough))
|
|
|
|
#else
|
|
|
|
#define FALL_THROUGH
|
|
|
|
#endif
|
|
|
|
|
2021-06-17 22:21:16 +00:00
|
|
|
/* Macro to print errors during initialization.
|
|
|
|
* Print them on both stderr and syslog.
|
|
|
|
* if debug_flag is on, syslog already print on console */
|
|
|
|
#define INIT_PRINT_ERR(...) do { if (!debug_flag) fprintf(stderr, __VA_ARGS__); syslog(LOG_ERR, __VA_ARGS__); } while(0)
|
|
|
|
|
2015-09-21 21:58:00 +00:00
|
|
|
#endif /* MACROS_H_INCLUDED */
|