char *string;
} RESULT;
+/* strndup() may be not available on several platforms */
+#ifndef HAVE_STRNDUP
+char *strndup(const char *source, size_t len);
+#endif
+
int SetVariable(const char *name, RESULT * value);
int SetVariableNumeric(const char *name, const double value);
int SetVariableString(const char *name, const char *value);
#include "cfg.h"
#include "hash.h"
#include "qprintf.h"
+#include "evaluator.h" // if strndup() is not available
#ifdef WITH_DMALLOC
#include <dmalloc.h>
return -1;
}
-#ifndef __MAC_OS_X_VERSION_10_3
running = strndup(buffer, sizeof(buffer));
-#else
- // there is no strndup in OSX
- running = strdup(buffer);
-#endif
while (1) {
value = strsep(&running, delim);
/* debug("%s pos %i -> %s", file, pos , value); */