Diff for /libelwix/inc/elwix.h between versions 1.6 and 1.9

version 1.6, 2013/06/20 08:07:45 version 1.9, 2013/12/15 22:54:41
Line 53  SUCH DAMAGE. Line 53  SUCH DAMAGE.
 #include <sys/param.h>  #include <sys/param.h>
 #include <sys/limits.h>  #include <sys/limits.h>
 #include <sys/socket.h>  #include <sys/socket.h>
   #include <sys/endian.h>
 #include <sys/un.h>  #include <sys/un.h>
 #include <net/if_dl.h>  #include <net/if_dl.h>
 #include <netinet/in.h>  #include <netinet/in.h>
Line 69  SUCH DAMAGE. Line 70  SUCH DAMAGE.
 #include <elwix/aav.h>  #include <elwix/aav.h>
 #include <elwix/anet.h>  #include <elwix/anet.h>
 #include <elwix/atime.h>  #include <elwix/atime.h>
   #include <elwix/apack.h>
   #include <elwix/apio.h>
   
   
 #ifndef STRSIZ  #ifndef STRSIZ
Line 153  SUCH DAMAGE. Line 156  SUCH DAMAGE.
 #define VACUUM_BETWEEN          2  #define VACUUM_BETWEEN          2
   
   
   extern int __isthreaded;
   
   
 // elwix_SetProg() Set program memory pool name  // elwix_SetProg() Set program memory pool name
 void elwix_SetProg(const char *csProgName);  void elwix_SetProg(const char *csProgName);
 // elwix_GetProg() Get program memory pool name  // elwix_GetProg() Get program memory pool name
Line 202  extern int elwix_Verbose; Line 208  extern int elwix_Verbose;
 #define EVERBS(x)               if ((x) <= elwix_Verbose)  #define EVERBS(x)               if ((x) <= elwix_Verbose)
 #define EVERBOSE(x, fmt, ...)   do { assert((fmt)); \  #define EVERBOSE(x, fmt, ...)   do { assert((fmt)); \
                                         if ((x) <= elwix_Verbose) { \                                          if ((x) <= elwix_Verbose) { \
                                                char str[BUFSIZ] = { 0 }; \                                                char __str[BUFSIZ] = { [0 ... BUFSIZ - 1] = 0 }; \
                                                snprintf(str, sizeof str, (fmt), ##__VA_ARGS__); \                                                snprintf(__str, sizeof __str, (fmt), ##__VA_ARGS__); \
                                                 syslog(LOG_DEBUG, "Verbose(%d):%s(%d): %s\n", \                                                  syslog(LOG_DEBUG, "Verbose(%d):%s(%d): %s\n", \
                                                                (x), __func__, __LINE__, str); \                                                                (x), __func__, __LINE__, __str); \
                                         } \                                          } \
                                 } while (0)                                  } while (0)
   
Line 220  extern int elwix_Debug; Line 226  extern int elwix_Debug;
                                            syslog(LOG_DEBUG, "I'm in %s(%d)\n", __func__, __LINE__)                                             syslog(LOG_DEBUG, "I'm in %s(%d)\n", __func__, __LINE__)
 #define EDEBUG(x, fmt, ...)     do { assert((fmt)); \  #define EDEBUG(x, fmt, ...)     do { assert((fmt)); \
                                         if ((x) & elwix_Debug) { \                                          if ((x) & elwix_Debug) { \
                                                char str[BUFSIZ] = { 0 }; \                                                char __str[BUFSIZ] = { [0 ... BUFSIZ - 1] = 0 }; \
                                                snprintf(str, sizeof str, (fmt), ##__VA_ARGS__); \                                                snprintf(__str, sizeof __str, (fmt), ##__VA_ARGS__); \
                                                 syslog(LOG_DEBUG, "Debug(%d):%s(%d): %s\n", \                                                  syslog(LOG_DEBUG, "Debug(%d):%s(%d): %s\n", \
                                                                (x), __func__, __LINE__, str); \                                                                (x), __func__, __LINE__, __str); \
                                         } \                                          } \
                                 } while (0)                                  } while (0)
   
 /* Logger macro */  /* Logger macro */
 #define ELOGGER(x, fmt, ...)    do { assert((fmt)); \  #define ELOGGER(x, fmt, ...)    do { assert((fmt)); \
                                        char str[BUFSIZ] = { 0 }; \                                        char __str[BUFSIZ] = { [0 ... BUFSIZ - 1] = 0 }; \
                                        snprintf(str, sizeof str, (fmt), ##__VA_ARGS__); \                                        snprintf(__str, sizeof __str, (fmt), ##__VA_ARGS__); \
                                         syslog((x), "Logger:%s(%d): %s\n", \                                          syslog((x), "Logger:%s(%d): %s\n", \
                                                                __func__, __LINE__, str); \                                                                __func__, __LINE__, __str); \
                                 } while (0)                                  } while (0)
   
 /* Error state macros */  /* Error state macros */
 #define EERROR(x, fmt, ...)     do { assert((fmt)); \  #define EERROR(x, fmt, ...)     do { assert((fmt)); \
                                        char str[BUFSIZ] = { 0 }; \                                        char __str[BUFSIZ] = { [0 ... BUFSIZ - 1] = 0 }; \
                                        snprintf(str, sizeof str, (fmt), ##__VA_ARGS__); \                                        snprintf(__str, sizeof __str, (fmt), ##__VA_ARGS__); \
                                         syslog(LOG_ERR, "Error:%s(%d): #%d - %s\n", \                                          syslog(LOG_ERR, "Error:%s(%d): #%d - %s\n", \
                                                         __func__, __LINE__, (x), str); \                                                         __func__, __LINE__, (x), __str); \
                                 } while (0)                                  } while (0)
 #define ESYSERR(x)              do { \  #define ESYSERR(x)              do { \
                                         if (x > 0 || errno) \                                          if (x > 0 || errno) \

Removed from v.1.6  
changed lines
  Added in v.1.9


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>