|
@@ -8,6 +8,26 @@
|
|
|
#include "cpumap.h"
|
|
|
#include "thread_map.h"
|
|
|
|
|
|
+/*
|
|
|
+ * Support debug printing even though util/debug.c is not linked. That means
|
|
|
+ * implementing 'verbose' and 'eprintf'.
|
|
|
+ */
|
|
|
+int verbose;
|
|
|
+
|
|
|
+int eprintf(int level, const char *fmt, ...)
|
|
|
+{
|
|
|
+ va_list args;
|
|
|
+ int ret = 0;
|
|
|
+
|
|
|
+ if (verbose >= level) {
|
|
|
+ va_start(args, fmt);
|
|
|
+ ret = vfprintf(stderr, fmt, args);
|
|
|
+ va_end(args);
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
/* Define PyVarObject_HEAD_INIT for python 2.5 */
|
|
|
#ifndef PyVarObject_HEAD_INIT
|
|
|
# define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size,
|