src/lib/log.h
changeset 8 21bb5cdca4db
parent 6 d2036d7799fd
child 11 a4e382d4a22a
--- a/src/lib/log.h	Fri Sep 26 20:39:51 2008 +0300
+++ b/src/lib/log.h	Fri Sep 26 21:13:35 2008 +0300
@@ -1,3 +1,5 @@
+#ifndef LIB_LOG_H
+#define LIB_LOG_H
 
 /*
  * error handling
@@ -35,12 +37,10 @@
 #define eerr_func(func, err, ...)   _generic_err(       1,  func,   err,__VA_ARGS__ )
 
 /*
- * error(func + colon + msg, ...) + goto error
- * err = negative error code
+ * Legacy...
  */
-#define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0)
-#define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0)
-#define EERROR(err, ...) do { eerr_func(__func__, (err), __VA_ARGS__); goto error; } while (0)
+#include "error.h"
+
 #define FATAL(...) err_func_exit(__func__, __VA_ARGS__)
 #define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__)
 #define WARNING(...) err_func(__func__, __VA_ARGS__)
@@ -68,3 +68,4 @@
 #define INFO(...) (void) (0)
 #endif
 
+#endif /* LIB_LOG_H */