--- libelwix/inc/elwix.h 2014/02/21 13:15:32 1.10.12.1 +++ libelwix/inc/elwix.h 2015/06/25 17:53:49 1.13 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: elwix.h,v 1.10.12.1 2014/02/21 13:15:32 misho Exp $ +* $Id: elwix.h,v 1.13 2015/06/25 17:53:49 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2015 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -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 }; \