Move debugmacros to util.h
diff --git a/src/libmtp.c b/src/libmtp.c
index ff7e76a..e2a42cb 100644
--- a/src/libmtp.c
+++ b/src/libmtp.c
@@ -41,6 +41,7 @@
 #include "libusb-glue.h"
 #include "device-flags.h"
 #include "playlist-spl.h"
+#include "util.h"
 
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/src/libmtp.h.in b/src/libmtp.h.in
index ce67d04..700f0c9 100644
--- a/src/libmtp.h.in
+++ b/src/libmtp.h.in
@@ -2,7 +2,7 @@
  * \file libmtp.h
  * Interface to the Media Transfer Protocol library.
  *
- * Copyright (C) 2005-2008 Linus Walleij <triad@df.lth.se>
+ * Copyright (C) 2005-2009 Linus Walleij <triad@df.lth.se>
  * Copyright (C) 2005-2008 Richard A. Low <richard@wentnet.com>
  * Copyright (C) 2007 Ted Bullock <tbullock@canada.com>
  * Copyright (C) 2008 Florent Mertens <flomertens@gmail.com>
@@ -56,29 +56,6 @@
 #include <usb.h>
 #include <stdint.h>
 
-
-/**
- * Info macro
- */
-#define LIBMTP_INFO(format, args...) \
-  do { \
-    if (LIBMTP_debug != 0) \
-      fprintf(stdout, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \
-	else \
-      fprintf(stdout, format, ##args); \
-  } while (0)
-
-/**
- * Error macro
- */
-#define LIBMTP_ERROR(format, args...) \
-  do { \
-    if (LIBMTP_debug != 0) \
-      fprintf(stderr, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \
-	else \
-      fprintf(stderr, format, ##args); \
-  } while (0)
-
 /**
  * @defgroup types libmtp global type definitions
  * @{
diff --git a/src/playlist-spl.c b/src/playlist-spl.c
index d4d5be1..3f98ee1 100644
--- a/src/playlist-spl.c
+++ b/src/playlist-spl.c
@@ -33,13 +33,13 @@
 #include <sys/uio.h>
 #endif
 #include <fcntl.h>
-
 #include <string.h>
 
 #include "libmtp.h"
 #include "libusb-glue.h"
 #include "ptp.h"
 #include "unicode.h"
+#include "util.h"
 
 #include "playlist-spl.h"
 
diff --git a/src/util.h b/src/util.h
index 8066a60..dec9617 100644
--- a/src/util.h
+++ b/src/util.h
@@ -26,4 +26,27 @@
 void data_dump(FILE *f, void *buf, uint32_t nbytes);
 void data_dump_ascii (FILE *f, void *buf, uint32_t n, uint32_t dump_boundry);
 
+/**
+ * Info macro
+ */
+#define LIBMTP_INFO(format, args...) \
+  do { \
+    if (LIBMTP_debug != 0) \
+      fprintf(stdout, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \
+	else \
+      fprintf(stdout, format, ##args); \
+  } while (0)
+
+/**
+ * Error macro
+ */
+#define LIBMTP_ERROR(format, args...) \
+  do { \
+    if (LIBMTP_debug != 0) \
+      fprintf(stderr, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \
+	else \
+      fprintf(stderr, format, ##args); \
+  } while (0)
+
+
 #endif //__MTP__UTIL__H