#define xxxassert(e) \
do { \
if (!(e)) \
- lbv_assert("XXX:" __func__, __FILE__, __LINE__, #e, errno); \
+ lbv_xxxassert(__func__, __FILE__, __LINE__, #e, errno); \
} while (0)
void lbv_assert(const char *, const char *, int, const char *, int);
+void lbv_xxxassert(const char *, const char *, int, const char *, int);
/* Assert zero return value */
#define AZ(foo) do { assert((foo) == 0); } while (0)
#include "libvarnish.h"
+void
+lbv_xxxassert(const char *func, const char *file, int line, const char *cond, int err)
+{
+
+ fprintf(stderr,
+ "Missing errorhandling code in %s(), %s line %d:\n"
+ " Condition(%s) not true.\n"
+ " errno = %d (%s)\n", func, file, line, cond, err, strerror(err));
+ abort();
+}
+
void
lbv_assert(const char *func, const char *file, int line, const char *cond, int err)
{