25RCSIDH(strerror_h, 
"$Id: afd4f63b86929d168e75a856ce630790ddc8d2a5 $")
 
   31#include <freeradius-devel/build.h> 
   32#include <freeradius-devel/missing.h> 
   44#define         fr_strerror_vprintf(_fmt, _ap) _fr_strerror_vprintf(__FILE__, __LINE__, _fmt, _ap) 
   48#define         fr_strerror_vprintf_push(_fmt, _ap) _fr_strerror_vprintf_push(__FILE__, __LINE, _fmt, _ap) 
   52#define         fr_strerror_vprintf_push_head(_fmt, _ap) _fr_strerror_vprintf_push_head(__FILE__, __LINE__, _fmt, _ap) 
   64#define         fr_strerror_printf(_fmt, ...) \ 
   65                        _fr_strerror_printf(__FILE__, __LINE__, _fmt, ##__VA_ARGS__) 
 
   67static inline CC_HINT(
nonnull) CC_HINT(format (printf, 3, 4))
 
   84#define         fr_strerror_printf_push(_fmt, ...) \ 
   85                        _fr_strerror_printf_push(__FILE__, __LINE__, _fmt, ##__VA_ARGS__) 
 
   87static inline CC_HINT(
nonnull) CC_HINT(format (printf, 3, 4))
 
  104#define         fr_strerror_printf_push_head(_fmt, ...) \ 
  105                        _fr_strerror_printf_push_head(__FILE__, __LINE__, _fmt, ##__VA_ARGS__) 
 
  107static inline CC_HINT(
nonnull) CC_HINT(format (printf, 3, 4))
 
  126#define         fr_strerror_marker_vprintf(_subject, _offset, _fmt, _ap) \ 
  127                        _fr_strerror_marker_vprintf(__FILE__, __LINE__, _subject, _offset, _fmt, _ap) 
 
  130                                            char const *subject, 
size_t offset, 
char const *
fmt, va_list ap);
 
  132#define         fr_strerror_marker_vprintf_push(_subject, _offset, _fmt, _ap) \ 
  133                        _fr_strerror_marker_vprintf_push(__FILE__, __LINE__, _subject, _offset, _fmt, _ap) 
 
  136                                                 char const *subject, 
size_t offset, 
char const *
fmt, va_list ap);
 
  138#define         fr_strerror_marker_vprintf_push_head(_subject, _offset, _fmt, _ap) \ 
  139                        _fr_strerror_marker_vprintf_push_head(__FILE__, __LINE__, _subject, _offset, _fmt, _ap) 
 
  142                                                      char const *subject, 
size_t offset, 
char const *
fmt, va_list ap);
 
  154#define         fr_strerror_marker_printf(_subject, _offset, _fmt, ...) \ 
  155                        _fr_strerror_marker_printf(__FILE__, __LINE__, _subject, _offset, _fmt, ##__VA_ARGS__) 
 
  157static inline CC_HINT(
nonnull) CC_HINT(format (printf, 5, 6))
 
  159                                           char const *subject, 
size_t offset, 
char const *
fmt, ...)
 
 
  178#define         fr_strerror_marker_printf_push(_subject, _offset, _fmt, ...) \ 
  179                        _fr_strerror_marker_printf_push(__FILE__, __LINE__, _subject, _offset, _fmt, ##__VA_ARGS__) 
 
  181static inline CC_HINT(
nonnull) CC_HINT(format (printf, 5, 6))
 
  183                                                char const *subject, 
size_t offset, 
char const *
fmt, ...)
 
 
  202#define         fr_strerror_marker_printf_push_head(_subject, _offset, _fmt, ...) \ 
  203                        _fr_strerror_marker_printf_push_head(__FILE__, __LINE__, _subject, _offset, _fmt, ##__VA_ARGS__) 
 
  205static inline CC_HINT(
nonnull) CC_HINT(format (printf, 5, 6))
 
  207                                                     char const *subject, 
size_t offset, 
char const *
fmt, ...)
 
 
  223#define         fr_strerror_const(_msg) _fr_strerror_const(__FILE__, __LINE__, _msg) 
  227#define         fr_strerror_const_push(_msg) _fr_strerror_const_push(__FILE__, __LINE__, _msg) 
  231#define         fr_strerror_const_push_head(_msg) _fr_strerror_const_push_head(__FILE__, __LINE__, _msg) 
  241char const      *
fr_strerror(
void) CC_HINT(warn_unused_result);
 
  262void            fr_perror(
char const *, ...) CC_HINT(format (printf, 1, 2));
 
  265char const      *
fr_perror_to_str(
char const *line_sep, 
char const *
fmt, ...) CC_HINT(format (printf, 2, 3));
 
static int const char * fmt
void _fr_strerror_marker_vprintf_push(char const *file, int line, char const *subject, size_t offset, char const *fmt, va_list ap)
Add an error marker to an existing stack of messages at the tail.
static void _fr_strerror_marker_printf(char const *file, int line, char const *subject, size_t offset, char const *fmt,...)
void _fr_strerror_const_push(char const *file, int line, char const *msg)
Add a message to an existing stack of messages at the tail.
static void _fr_strerror_printf_push_head(char const *file, int line, char const *fmt,...)
char const * fr_strerror(void)
Get the last library error.
static void _fr_strerror_printf(char const *file, int line, char const *fmt,...)
char const * fr_strerror_peek(void)
Get the last library error.
void fr_strerror_clear(void)
Clears all pending messages from the talloc pools.
static void _fr_strerror_printf_push(char const *file, int line, char const *fmt,...)
static void _fr_strerror_marker_printf_push(char const *file, int line, char const *subject, size_t offset, char const *fmt,...)
char const * fr_strerror_marker_pop(char const **subject, size_t *offset)
Pop the last library error with marker information.
static void _fr_strerror_marker_printf_push_head(char const *file, int line, char const *subject, size_t offset, char const *fmt,...)
void _fr_strerror_const_push_head(char const *file, int line, char const *msg)
Add a message to an existing stack of messages at the head.
void fr_perror(char const *,...))
Print the current error to stderr with a prefix.
char const * fr_perror_to_str(char const *line_sep, char const *fmt,...))
Print the stack of string buffers to a thread local buffer.
void _fr_strerror_vprintf_push(char const *file, int line, char const *fmt, va_list ap)
Add a message to an existing stack of messages at the tail.
void _fr_strerror_marker_vprintf(char const *file, int line, char const *subject, size_t offset, char const *fmt, va_list ap)
Add an error marker to an existing stack of messages.
void _fr_strerror_vprintf_push_head(char const *file, int line, char const *fmt, va_list ap)
Add a message to an existing stack of messages at the head.
void _fr_strerror_const(char const *file, int line, char const *msg)
Log to thread local error buffer.
char const * fr_strerror_pop(void)
Pop the last library error.
void _fr_strerror_marker_vprintf_push_head(char const *file, int line, char const *subject, size_t offset, char const *fmt, va_list ap)
Add an error marker to an existing stack of messages at the head.
char const * fr_strerror_marker_peek(char const **subject, size_t *offset)
Get the last library error marker.
char const * fr_strerror_marker(char const **subject, size_t *offset)
Get the last library error marker.
void _fr_strerror_vprintf(char const *file, int line, char const *fmt, va_list ap)
Log to thread local error buffer.