1 /*****************************************************************************
2 * RRDtool 1.1.x Copyright Tobias Oetiker, 1997 - 2002
3 * This file: Copyright 2003 Peter Stamfest <peter@stamfest.at>
5 * Distributed under the GPL
6 *****************************************************************************
7 * rrd_not_thread_safe.c Contains routines used when thread safety is not
9 *****************************************************************************
11 *************************************************************************** */
17 static char rrd_error[MAXLEN] = "\0";
18 static char rrd_liberror[ERRBUFLEN] = "\0";
19 /* The global context is very useful in the transition period to even
20 more thread-safe stuff, it can be used whereever we need a context
21 and do not need to worry about concurrency. */
22 static struct rrd_context global_ctx = {
30 struct rrd_context *rrd_get_context() {
34 /* how ugly that is!!! - make sure strerror is what it should be. It
35 might be redefined to help in keeping other modules thread safe by
36 silently turning misplaced strerror into rrd_strerror, but here
37 this turns recursive! */
39 const char *rrd_strerror(int err) {