blanking support
[qemu] / vl.h
diff --git a/vl.h b/vl.h
index 2805853..cd49e97 100644 (file)
--- a/vl.h
+++ b/vl.h
 #ifndef VL_H
 #define VL_H
 
+/* we put basic includes here to avoid repeating them in device drivers */
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <inttypes.h>
 #include <time.h>
+#include <ctype.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#ifdef _WIN32
+#define lseek64 lseek
+#endif
 
 #include "cpu.h"
 
+#ifndef glue
+#define xglue(x, y) x ## y
+#define glue(x, y) xglue(x, y)
+#define stringify(s)   tostring(s)
+#define tostring(s)    #s
+#endif
+
+#if defined(WORDS_BIGENDIAN)
+static inline uint32_t be32_to_cpu(uint32_t v)
+{
+    return v;
+}
+
+static inline uint16_t be16_to_cpu(uint16_t v)
+{
+    return v;
+}
+
+static inline uint32_t le32_to_cpu(uint32_t v)
+{
+    return bswap32(v);
+}
+
+static inline uint16_t le16_to_cpu(uint16_t v)
+{
+    return bswap16(v);
+}
+
+#else
+static inline uint32_t be32_to_cpu(uint32_t v)
+{
+    return bswap32(v);
+}
+
+static inline uint16_t be16_to_cpu(uint16_t v)
+{
+    return bswap16(v);
+}
+
+static inline uint32_t le32_to_cpu(uint32_t v)
+{
+    return v;
+}
+
+static inline uint16_t le16_to_cpu(uint16_t v)
+{
+    return v;
+}
+#endif
+
+
 /* vl.c */
 extern int reset_requested;
 
@@ -344,6 +416,7 @@ void serial_receive_break(SerialState *s);
 
 void pic_set_irq(int irq, int level);
 void pic_init(void);
+uint32_t pic_intack_read(CPUState *env);
 
 /* i8254.c */
 
@@ -378,7 +451,7 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
 
 /* monitor.c */
 void monitor_init(void);
-void term_printf(const char *fmt, ...);
+void term_printf(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
 void term_flush(void);
 void term_print_help(void);