#include <freeradius-devel/io/control.h>
#include <freeradius-devel/io/ring_buffer.h>
-#include <freeradius-devel/util/log.h>
+#include <freeradius-devel/util/strerror.h>
+#include <freeradius-devel/util/syserror.h>
#include <string.h>
#include <sys/event.h>
#include <freeradius-devel/server/modules.h>
#include <freeradius-devel/unlang/base.h>
#include <freeradius-devel/io/master.h>
+#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/server/rad_assert.h>
#define PR_CONNECTION_MAGIC (0x434f4e4e)
RCSID("$Id$")
#include <freeradius-devel/io/message.h>
-#include <freeradius-devel/util/log.h>
+#include <freeradius-devel/util/strerror.h>
#include <string.h>
RCSID("$Id$")
#include <freeradius-devel/io/ring_buffer.h>
-#include <freeradius-devel/util/log.h>
+#include <freeradius-devel/util/strerror.h>
#include <freeradius-devel/server/rad_assert.h>
#include <string.h>
#include <freeradius-devel/io/schedule.h>
#include <freeradius-devel/util/dlist.h>
#include <freeradius-devel/util/rbtree.h>
+#include <freeradius-devel/util/syserror.h>
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/modules.h>
#include <freeradius-devel/server/rad_assert.h>
+#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/tls/base.h>
/** Certificate formats
# include <limits.h>
#endif
+#include <freeradius-devel/autoconf.h>
+
+#include <freeradius-devel/util/strerror.h>
+#include <freeradius-devel/util/syserror.h>
+#include <freeradius-devel/util/misc.h>
#include <freeradius-devel/util/threads.h>
#include <freeradius-devel/util/inet.h>
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/util/pair_cursor.h>
#include <freeradius-devel/util/packet.h>
-#include <freeradius-devel/radius/defs.h>
-#include <freeradius-devel/radius/radius.h>
#include <freeradius-devel/util/talloc.h>
#include <freeradius-devel/util/hash.h>
#include <freeradius-devel/util/regex.h>
#include <freeradius-devel/util/proto.h>
+#include <freeradius-devel/util/print.h>
#include <freeradius-devel/util/conf.h>
-#include <freeradius-devel/autoconf.h>
+
#include <freeradius-devel/util/rbtree.h>
#include <freeradius-devel/util/log.h>
#include <freeradius-devel/util/version.h>
#include <freeradius-devel/util/value.h>
#include <freeradius-devel/util/debug.h>
+#include <freeradius-devel/util/fifo.h>
+
+#include <freeradius-devel/radius/defs.h>
+#include <freeradius-devel/radius/radius.h>
#ifdef SIZEOF_UNSIGNED_INT
# if SIZEOF_UNSIGNED_INT != 4
# define FREE_MAGIC (0xF4EEF4EE)
#endif
-/*
- * Printing functions.
- */
-size_t fr_utf8_char(uint8_t const *str, ssize_t inlen);
-ssize_t fr_utf8_str(uint8_t const *str, ssize_t inlen);
-char const *fr_utf8_strchr(int *chr_len, char const *str, char const *chr);
-size_t fr_snprint(char *out, size_t outlen, char const *in, ssize_t inlen, char quote);
-size_t fr_snprint_len(char const *in, ssize_t inlen, char quote);
-char *fr_asprint(TALLOC_CTX *ctx, char const *in, ssize_t inlen, char quote);
-char *fr_vasprintf(TALLOC_CTX *ctx, char const *fmt, va_list ap);
-char *fr_asprintf(TALLOC_CTX *ctx, char const *fmt, ...) CC_HINT(format (printf, 2, 3));
-
-#define is_truncated(_ret, _max) ((_ret) >= (size_t)(_max))
-#define truncate_len(_ret, _max) (((_ret) >= (size_t)(_max)) ? (((size_t)(_max)) - 1) : _ret)
-
-/** Boilerplate for checking truncation
- *
- * If truncation has occurred, advance _p as far as possible without
- * overrunning the output buffer, and \0 terminate. Then return the length
- * of the buffer we would have needed to write the full value.
- *
- * If truncation has not occurred, advance _p by whatever the copy or print
- * function returned.
- */
-#define RETURN_IF_TRUNCATED(_p, _ret, _max) \
-do { \
- if (is_truncated(_ret, _max)) { \
- size_t _r = (_p - out) + _ret; \
- _p += truncate_len(_ret, _max); \
- *_p = '\0'; \
- return _r; \
- } \
- _p += _ret; \
-} while (0)
-
/*
* Several handy miscellaneous functions.
*/
-int fr_set_signal(int sig, sig_t func);
-int fr_talloc_link_ctx(TALLOC_CTX *parent, TALLOC_CTX *child);
-int fr_unset_signal(int sig);
-int rad_lockfd(int fd, int lock_len);
-int rad_lockfd_nonblock(int fd, int lock_len);
-int rad_unlockfd(int fd, int lock_len);
-char *fr_abin2hex(TALLOC_CTX *ctx, uint8_t const *bin, size_t inlen);
-size_t fr_bin2hex(char *hex, uint8_t const *bin, size_t inlen);
-size_t fr_hex2bin(uint8_t *bin, size_t outlen, char const *hex, size_t inlen);
-uint64_t fr_strtoull(char const *value, char **end);
-int64_t fr_strtoll(char const *value, char **end);
-char *fr_trim(char const *str, size_t size);
+
/** Check whether the string is all whitespace
*
return true;
}
-int fr_nonblock(int fd);
-int fr_blocking(int fd);
-ssize_t fr_writev(int fd, struct iovec[], int iovcnt, struct timeval *timeout);
-
-ssize_t fr_utf8_to_ucs2(uint8_t *out, size_t outlen, char const *in, size_t inlen);
-size_t fr_snprint_uint128(char *out, size_t outlen, uint128_t const num);
-int fr_time_from_str(time_t *date, char const *date_str);
-void fr_timeval_from_ms(struct timeval *out, uint64_t ms);
-void fr_timeval_from_usec(struct timeval *out, uint64_t usec);
-void fr_timeval_subtract(struct timeval *out, struct timeval const *end, struct timeval const *start);
-void fr_timeval_add(struct timeval *out, struct timeval const *a, struct timeval const *b);
-void fr_timeval_divide(struct timeval *out, struct timeval const *in, int divisor);
-
-int fr_timeval_cmp(struct timeval const *a, struct timeval const *b);
-int fr_timeval_from_str(struct timeval *out, char const *in);
-bool fr_timeval_isset(struct timeval const *tv);
-
-void fr_timespec_subtract(struct timespec *out, struct timespec const *end, struct timespec const *start);
-
-bool fr_multiply(uint64_t *result, uint64_t lhs, uint64_t rhs);
-int fr_size_from_str(size_t *out, char const *str);
-int8_t fr_pointer_cmp(void const *a, void const *b);
-void fr_quick_sort(void const *to_sort[], int min_idx, int max_idx, fr_cmp_t cmp);
-int fr_digest_cmp(uint8_t const *a, uint8_t const *b, size_t length) CC_HINT(nonnull);
-
/*
* Define TALLOC_DEBUG to check overflows with talloc.
* we can't use valgrind, because the memory used by
/* crypt wrapper from crypt.c */
int fr_crypt_check(char const *password, char const *reference_crypt);
-/*
- * FIFOs
- */
-typedef struct fr_fifo_t fr_fifo_t;
-typedef void (*fr_fifo_free_t)(void *);
-
-/** Creates a fifo that verifies elements are of a specific talloc type
- *
- * @param[in] _ctx to tie fifo lifetime to.
- * If ctx is freed, fifo will free any nodes, calling the
- * free function if set.
- * @param[in] _max_entries Maximum number of entries.
- * @param[in] _talloc_type of elements.
- * @param[in] _node_free Optional function used to free data if tree nodes are
- * deleted or replaced.
- * @return
- * - A new fifo on success.
- * - NULL on failure.
- */
-#define fr_fifo_talloc_create(_ctx, _talloc_type, _max_entries, _node_free) \
- _fr_fifo_create(_ctx, #_talloc_type, _max_entries, _node_free)
-
-/** Creates a fifo
- *
- * @param[in] _ctx to tie fifo lifetime to.
- * If ctx is freed, fifo will free any nodes, calling the
- * free function if set.
- * @param[in] _max_entries Maximum number of entries.
- * @param[in] _node_free Optional function used to free data if tree nodes are
- * deleted or replaced.
- * @return
- * - A new fifo on success.
- * - NULL on failure.
- */
-#define fr_fifo_create(_ctx, _max_entries, _node_free) \
- _fr_fifo_create(_ctx, NULL, _max_entries, _node_free)
-
-fr_fifo_t *_fr_fifo_create(TALLOC_CTX *ctx, char const *type, int max_entries, fr_fifo_free_t free_node);
-int fr_fifo_push(fr_fifo_t *fi, void *data);
-void *fr_fifo_pop(fr_fifo_t *fi);
-void *fr_fifo_peek(fr_fifo_t *fi);
-unsigned int fr_fifo_num_elements(fr_fifo_t *fi);
-
/*
* socket.c
*/
*/
RCSID("$Id$")
-#include <freeradius-devel/util/base.h>
+#include <string.h>
+#include <talloc.h>
+
+#include "fifo.h"
struct fr_fifo_t {
unsigned int num; //!< How many elements exist in the fifo.
--- /dev/null
+#pragma once
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/** Non-thread-safe fifo (FIFO) implementation
+ *
+ * @file src/lib/util/fifo.c
+ *
+ * @copyright 2005,2006 The FreeRADIUS server project
+ * @copyright 2005 Alan DeKok <aland@ox.org>
+ */
+RCSIDH(fifo_h, "$Id$")
+
+#include <talloc.h>
+
+typedef struct fr_fifo_t fr_fifo_t;
+typedef void (*fr_fifo_free_t)(void *);
+
+/** Creates a fifo that verifies elements are of a specific talloc type
+ *
+ * @param[in] _ctx to tie fifo lifetime to.
+ * If ctx is freed, fifo will free any nodes, calling the
+ * free function if set.
+ * @param[in] _max_entries Maximum number of entries.
+ * @param[in] _talloc_type of elements.
+ * @param[in] _node_free Optional function used to free data if tree nodes are
+ * deleted or replaced.
+ * @return
+ * - A new fifo on success.
+ * - NULL on failure.
+ */
+#define fr_fifo_talloc_create(_ctx, _talloc_type, _max_entries, _node_free) \
+ _fr_fifo_create(_ctx, #_talloc_type, _max_entries, _node_free)
+
+/** Creates a fifo
+ *
+ * @param[in] _ctx to tie fifo lifetime to.
+ * If ctx is freed, fifo will free any nodes, calling the
+ * free function if set.
+ * @param[in] _max_entries Maximum number of entries.
+ * @param[in] _node_free Optional function used to free data if tree nodes are
+ * deleted or replaced.
+ * @return
+ * - A new fifo on success.
+ * - NULL on failure.
+ */
+#define fr_fifo_create(_ctx, _max_entries, _node_free) \
+ _fr_fifo_create(_ctx, NULL, _max_entries, _node_free)
+
+fr_fifo_t *_fr_fifo_create(TALLOC_CTX *ctx, char const *type, int max_entries, fr_fifo_free_t free_node);
+int fr_fifo_push(fr_fifo_t *fi, void *data);
+void *fr_fifo_pop(fr_fifo_t *fi);
+void *fr_fifo_peek(fr_fifo_t *fi);
+unsigned int fr_fifo_num_elements(fr_fifo_t *fi);
*
* @copyright 2015-2017 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
*/
+RCSIDH(fring_h, "$Id$")
+
#include <stdbool.h>
#include <stdint.h>
#include <talloc.h>
#include <fcntl.h>
-FILE *fr_log_fp = NULL;
+FILE *fr_log_fp = NULL;
+int fr_debug_lvl = 0;
/** Canonicalize error strings, removing tabs, and generate spaces for error marker
*
* Error functions.
*/
void fr_printf_log(char const *, ...) CC_HINT(format (printf, 1, 2));
-
-void fr_strerror_printf(char const *, ...) CC_HINT(format (printf, 1, 2));
-void fr_strerror_printf_push(char const *fmt, ...) CC_HINT(format (printf, 1, 2));
-
-char const *fr_strerror(void);
-char const *fr_strerror_peek(void);
-char const *fr_strerror_pop(void);
-
-void fr_perror(char const *, ...) CC_HINT(format (printf, 1, 2));
-void fr_strerror_free(void);
void fr_canonicalize_error(TALLOC_CTX *ctx, char **spaces, char **text, ssize_t slen, char const *msg);
-char const *fr_syserror(int num);
extern bool fr_reverse_lookups; /* do IP -> hostname lookups? */
extern bool fr_hostname_lookups; /* do hostname -> IP lookups? */
extern int fr_debug_lvl; /* 0 = no debugging information */
*/
RCSID("$Id$")
-#include <freeradius-devel/util/base.h>
+#include "misc.h"
#include <ctype.h>
#include <sys/file.h>
#include <grp.h>
#include <pwd.h>
#include <sys/uio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
+#include <freeradius-devel/util/syserror.h>
+#include <freeradius-devel/util/strerror.h>
+#include <freeradius-devel/util/debug.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
/*
* Some versions of Linux don't have closefrom(), but they will
* have /proc.
* OSX doesn't have closefrom() or /proc/self/fd, but it does
* have /dev/fd
*/
-#ifdef __linux__
-#define CLOSEFROM_DIR "/proc/self/fd"
-#elif defined(__APPLE__)
-#define CLOSEFROM_DIR "/dev/fd"
-#else
-#undef HAVE_DIRENT_H
+# ifdef __linux__
+# define CLOSEFROM_DIR "/proc/self/fd"
+# elif defined(__APPLE__)
+# define CLOSEFROM_DIR "/dev/fd"
+# else
+# undef HAVE_DIRENT_H
+# endif
#endif
-#endif
#define FR_PUT_LE16(a, val)\
do {\
a[0] = ((uint16_t) (val)) & 0xff;\
} while (0)
-int fr_debug_lvl = 0;
-
static char const *months[] = {
"jan", "feb", "mar", "apr", "may", "jun",
"jul", "aug", "sep", "oct", "nov", "dec" };
--- /dev/null
+#pragma once
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/** Various miscellaneous utility functions
+ *
+ * @file src/lib/util/misc.h
+ *
+ * @copyright 2000,2006 The FreeRADIUS server project
+ */
+RCSIDH(misc_h, "$Id$")
+
+#include <talloc.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <freeradius-devel/missing.h>
+
+typedef int8_t (*fr_cmp_t)(void const *a, void const *b);
+
+int fr_set_signal(int sig, sig_t func);
+int fr_talloc_link_ctx(TALLOC_CTX *parent, TALLOC_CTX *child);
+int fr_unset_signal(int sig);
+int rad_lockfd(int fd, int lock_len);
+int rad_lockfd_nonblock(int fd, int lock_len);
+int rad_unlockfd(int fd, int lock_len);
+char *fr_abin2hex(TALLOC_CTX *ctx, uint8_t const *bin, size_t inlen);
+size_t fr_bin2hex(char *hex, uint8_t const *bin, size_t inlen);
+size_t fr_hex2bin(uint8_t *bin, size_t outlen, char const *hex, size_t inlen);
+uint64_t fr_strtoull(char const *value, char **end);
+int64_t fr_strtoll(char const *value, char **end);
+char *fr_trim(char const *str, size_t size);
+
+int fr_nonblock(int fd);
+int fr_blocking(int fd);
+
+ssize_t fr_writev(int fd, struct iovec vector[], int iovcnt, struct timeval *timeout);
+ssize_t fr_utf8_to_ucs2(uint8_t *out, size_t outlen, char const *in, size_t inlen);
+size_t fr_snprint_uint128(char *out, size_t outlen, uint128_t const num);
+int fr_time_from_str(time_t *date, char const *date_str);
+void fr_timeval_from_ms(struct timeval *out, uint64_t ms);
+void fr_timeval_from_usec(struct timeval *out, uint64_t usec);
+void fr_timeval_subtract(struct timeval *out, struct timeval const *end, struct timeval const *start);
+void fr_timeval_add(struct timeval *out, struct timeval const *a, struct timeval const *b);
+void fr_timeval_divide(struct timeval *out, struct timeval const *in, int divisor);
+
+int fr_timeval_cmp(struct timeval const *a, struct timeval const *b);
+int fr_timeval_from_str(struct timeval *out, char const *in);
+bool fr_timeval_isset(struct timeval const *tv);
+
+void fr_timespec_subtract(struct timespec *out, struct timespec const *end, struct timespec const *start);
+
+bool fr_multiply(uint64_t *result, uint64_t lhs, uint64_t rhs);
+int fr_size_from_str(size_t *out, char const *str);
+int8_t fr_pointer_cmp(void const *a, void const *b);
+void fr_quick_sort(void const *to_sort[], int min_idx, int max_idx, fr_cmp_t cmp);
+int fr_digest_cmp(uint8_t const *a, uint8_t const *b, size_t length) CC_HINT(nonnull);
*/
RCSID("$Id$")
-#include <freeradius-devel/util/base.h>
-#include <ctype.h>
+#include "print.h"
+
+#include <ctype.h>
+#include <string.h>
+#include <talloc.h>
+
+#include <freeradius-devel/util/debug.h>
+#include <freeradius-devel/util/pair.h>
+#include <freeradius-devel/util/talloc.h>
+#include <freeradius-devel/util/misc.h>
+#include <freeradius-devel/util/strerror.h>
/** Checks for utf-8, taken from http://www.w3.org/International/questions/qa-forms-utf-8
*
--- /dev/null
+#pragma once
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/** Functions to produce and parse the FreeRADIUS presentation format
+ *
+ * @file src/lib/util/print.h
+ *
+ * @copyright 2000,2006 The FreeRADIUS server project
+ */
+RCSIDH(print_h, "$Id$")
+
+#include <talloc.h>
+
+size_t fr_utf8_char(uint8_t const *str, ssize_t inlen);
+ssize_t fr_utf8_str(uint8_t const *str, ssize_t inlen);
+char const *fr_utf8_strchr(int *chr_len, char const *str, char const *chr);
+size_t fr_snprint(char *out, size_t outlen, char const *in, ssize_t inlen, char quote);
+size_t fr_snprint_len(char const *in, ssize_t inlen, char quote);
+char *fr_asprint(TALLOC_CTX *ctx, char const *in, ssize_t inlen, char quote);
+char *fr_vasprintf(TALLOC_CTX *ctx, char const *fmt, va_list ap);
+char *fr_asprintf(TALLOC_CTX *ctx, char const *fmt, ...) CC_HINT(format (printf, 2, 3));
+
+#define is_truncated(_ret, _max) ((_ret) >= (size_t)(_max))
+#define truncate_len(_ret, _max) (((_ret) >= (size_t)(_max)) ? (((size_t)(_max)) - 1) : _ret)
+
+/** Boilerplate for checking truncation
+ *
+ * If truncation has occurred, advance _p as far as possible without
+ * overrunning the output buffer, and \0 terminate. Then return the length
+ * of the buffer we would have needed to write the full value.
+ *
+ * If truncation has not occurred, advance _p by whatever the copy or print
+ * function returned.
+ */
+#define RETURN_IF_TRUNCATED(_p, _ret, _max) \
+do { \
+ if (is_truncated(_ret, _max)) { \
+ size_t _r = (_p - out) + _ret; \
+ _p += truncate_len(_ret, _max); \
+ *_p = '\0'; \
+ return _r; \
+ } \
+ _p += _ret; \
+} while (0)
*/
RCSID("$Id$")
-#include <freeradius-devel/util/rbtree.h>
+#include "rbtree.h"
+
#include <freeradius-devel/util/log.h>
+#include <freeradius-devel/util/strerror.h>
+
#include <pthread.h>
/* Red-Black tree description */
+#pragma once
/*
* This program is is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+#pragma once
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/** Support functions to allow libraries to provide errors to their callers
+ *
+ * @file src/lib/util/strerror.h
+ *
+ * @copyright 2017 The FreeRADIUS server project
+ * @copyright 2017 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
+ */
+RCSIDH(strerror_h, "$Id$")
+
+void fr_strerror_printf(char const *, ...) CC_HINT(format (printf, 1, 2));
+void fr_strerror_printf_push(char const *fmt, ...) CC_HINT(format (printf, 1, 2));
+
+char const *fr_strerror(void);
+char const *fr_strerror_peek(void);
+char const *fr_strerror_pop(void);
+
+void fr_perror(char const *, ...) CC_HINT(format (printf, 1, 2));
+void fr_strerror_free(void);
--- /dev/null
+#pragma once
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/** Support functions to allow libraries to get system errors in a threadsafe and easily debuggable way
+ *
+ * @file src/lib/util/syserror.c
+ *
+ * @copyright 2017 The FreeRADIUS server project
+ * @copyright 2017 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
+ */
+RCSIDH(syserror_h, "$Id$")
+
+char const *fr_syserror(int num);
RCSID("$Id$")
#include <freeradius-devel/util/base.h>
+#include <freeradius-devel/util/strerror.h>
#include <freeradius-devel/server/rad_assert.h>
#include <ctype.h>
#include <freeradius-devel/util/types.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/log.h>
+#include <freeradius-devel/util/strerror.h>
/*
* Avoid circular type references.