summaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-16 13:53:32 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-16 13:53:32 +0000
commitcd390083ad1fea1ddb93df9c5560eba0a9f26a0d (patch)
tree8594a86a0760b7e393a75e883d00256c29e9ed00 /qemu-common.h
parent77b9435f13238ad4b656f8543cea5498e8a0e2a1 (diff)
Attached patch fixes a series of this warning
when compiling on NetBSD: warning: array subscript has type 'char' Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5727 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 7831409fb..74eaa4dfc 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -95,6 +95,22 @@ int strstart(const char *str, const char *val, const char **ptr);
int stristart(const char *str, const char *val, const char **ptr);
time_t mktimegm(struct tm *tm);
+#define qemu_isalnum(c) isalnum((unsigned char)(c))
+#define qemu_isalpha(c) isalpha((unsigned char)(c))
+#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
+#define qemu_isdigit(c) isdigit((unsigned char)(c))
+#define qemu_isgraph(c) isgraph((unsigned char)(c))
+#define qemu_islower(c) islower((unsigned char)(c))
+#define qemu_isprint(c) isprint((unsigned char)(c))
+#define qemu_ispunct(c) ispunct((unsigned char)(c))
+#define qemu_isspace(c) isspace((unsigned char)(c))
+#define qemu_isupper(c) isupper((unsigned char)(c))
+#define qemu_isxdigit(c) isxdigit((unsigned char)(c))
+#define qemu_tolower(c) tolower((unsigned char)(c))
+#define qemu_toupper(c) toupper((unsigned char)(c))
+#define qemu_isascii(c) isascii((unsigned char)(c))
+#define qemu_toascii(c) toascii((unsigned char)(c))
+
void *qemu_malloc(size_t size);
void *qemu_realloc(void *ptr, size_t size);
void *qemu_mallocz(size_t size);