summaryrefslogtreecommitdiffstats
path: root/server/red_common.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-03-09 11:10:00 +0100
committerAlexander Larsson <alexl@redhat.com>2010-03-09 11:10:00 +0100
commit90c5766caf16e35cb871116a4655a106a3c272dc (patch)
treeddc2ea976240a3f8f9c3294b41492256e6eb3f82 /server/red_common.h
parent5cb99e12c6817592f49ca153a3081dd6b5995cf2 (diff)
downloadspice-90c5766caf16e35cb871116a4655a106a3c272dc.tar.gz
spice-90c5766caf16e35cb871116a4655a106a3c272dc.tar.xz
spice-90c5766caf16e35cb871116a4655a106a3c272dc.zip
Use macros from <spice/macros.h> rather than duplicate them
Diffstat (limited to 'server/red_common.h')
-rw-r--r--server/red_common.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/server/red_common.h b/server/red_common.h
index 6a43dc3a..4a847483 100644
--- a/server/red_common.h
+++ b/server/red_common.h
@@ -22,21 +22,7 @@
#include <openssl/ssl.h>
#include <spice/protocol.h>
-
-#ifndef MIN
-#define MIN(x, y) (((x) <= (y)) ? (x) : (y))
-#endif
-#ifndef MAX
-#define MAX(x, y) (((x) >= (y)) ? (x) : (y))
-#endif
-
-#ifndef ABS
-#define ABS(a) ((a) >= 0 ? (a) : -(a))
-#endif
-
-#ifndef ALIGN
-#define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1))
-#endif
+#include <spice/macros.h>
#define ASSERT(x) if (!(x)) { \
printf("%s: ASSERT %s failed\n", __FUNCTION__, #x); \
@@ -53,9 +39,6 @@
abort(); \
}
-#define TRUE 1
-#define FALSE 0
-
#define red_error(format, ...) { \
printf("%s: " format "\n", __FUNCTION__, ## __VA_ARGS__ ); \
abort(); \
@@ -79,10 +62,6 @@
} \
}
-#define OFFSETOF(type, member) ((unsigned long)&((type *)0)->member)
-#define CONTAINEROF(ptr, type, member) \
- ((type *)((uint8_t *)(ptr) - OFFSETOF(type, member)))
-
typedef enum {
IMAGE_COMPRESS_INVALID,
IMAGE_COMPRESS_AUTO_GLZ,