summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2010-04-14 17:40:14 +0200
committerJiri Denemark <jdenemar@redhat.com>2010-04-22 10:20:32 +0200
commit60aef9e4677e9aa6ad99546ff58fde0a2272ee45 (patch)
tree912d6322548676813fc93b2ec9482bea8b848edd
parentDeal with CPU models in [] (diff)
downloadlibvirt-60aef9e4677e9aa6ad99546ff58fde0a2272ee45.tar.gz
libvirt-60aef9e4677e9aa6ad99546ff58fde0a2272ee45.tar.bz2
libvirt-60aef9e4677e9aa6ad99546ff58fde0a2272ee45.zip
Move MIN macro to util.h so that others can use it
-rw-r--r--src/util/util.c4
-rw-r--r--src/util/util.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/util/util.c b/src/util/util.c
index 268944da5..99383d1e5 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -79,10 +79,6 @@
# define NSIG 32
#endif
-#ifndef MIN
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
#define VIR_FROM_THIS VIR_FROM_NONE
#define virUtilError(code, ...) \
diff --git a/src/util/util.h b/src/util/util.h
index 4f0b23300..6bf6bcc3c 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -32,6 +32,10 @@
# include <sys/select.h>
# include <sys/types.h>
+# ifndef MIN
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+# endif
+
int saferead(int fd, void *buf, size_t count) ATTRIBUTE_RETURN_CHECK;
ssize_t safewrite(int fd, const void *buf, size_t count)
ATTRIBUTE_RETURN_CHECK;