123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #ifndef ERROR_HEADER
- #define ERROR_HEADER
- #include <errno.h>
- #include "../tools/types.h"
- #if defined (WIN32)
- #define __func__ __FUNCTION__
- #endif
- #ifndef ECANCELED
- #define ECANCELED 0
- #endif
- #ifndef ENOTSUP
- #define ENOTSUP EPERM
- #endif
- #ifndef EBADMSG
- #define EBADMSG 0
- #endif
- #ifndef EPROTONOSUPPORT
- #define EPROTONOSUPPORT 124
- #endif
- #ifndef ENODATA
- #define ENODATA 0
- #endif
- #ifndef EOVERFLOW
- #define EOVERFLOW 0
- #endif
- #define ERROR_NOTROOT "This program needs root privileges"
- #define ERROR_TOOMANY "Too many command line arguments"
- #define CANT_START_TIMER "function %s can't start timer", __func__
- #define CANT_RESET_TIMER "function %s can't reset timer", __func__
- #define TRACE error (0, 0, "%s (%d)", __FILE__, __LINE__);
- #ifdef __GNUC__
- __attribute__ ((format (printf, 3, 4)))
- #endif
- signed error (signed status, errno_t number, char const * format, ...);
- #ifdef __GNUC__
- __attribute__ ((format (printf, 3, 4)))
- #endif
- signed debug (signed status, char const * string, char const * format, ...);
- signed extra (signed status, errno_t number, int argc, char const * argv []);
- #endif
|