--- libelwix/inc/elwix.h 2014/02/21 13:30:19 1.11 +++ libelwix/inc/elwix.h 2015/01/19 23:21:12 1.12 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: elwix.h,v 1.11 2014/02/21 13:30:19 misho Exp $ +* $Id: elwix.h,v 1.12 2015/01/19 23:21:12 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -262,6 +262,12 @@ extern int elwix_Debug; __func__, __LINE__, __str); \ } while (0) +#define EWARNING(x, fmt, ...) do { assert((fmt)); \ + char __str[BUFSIZ] = { [0 ... BUFSIZ - 1] = 0 }; \ + snprintf(__str, sizeof __str, (fmt), ##__VA_ARGS__); \ + syslog(LOG_WARNING, "Warning:%s(%d): #%d - %s\n", \ + __func__, __LINE__, (x), __str); \ + } while (0) /* Error state macros */ #define EERROR(x, fmt, ...) do { assert((fmt)); \ char __str[BUFSIZ] = { [0 ... BUFSIZ - 1] = 0 }; \