aboutsummaryrefslogtreecommitdiff
path: root/util/romtool/tools/lzma/C/Common/MyGuidDef.h
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2009-03-31 11:57:36 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-03-31 11:57:36 +0000
commit5d01ec0f80cc8379df17ed9a922de37b487770b4 (patch)
tree6994cd877e80a721cef1154239d4af6653980379 /util/romtool/tools/lzma/C/Common/MyGuidDef.h
parent0f0f9bb9a2e1c1257fdfee0b50061e82ea92161b (diff)
This patch adds Jordan's romtool support for v2.
There are a few changes. The 20K bootblock size restriction is gone. ROMFS has been tested and works on v2 with qemu and kontron. Once this patch is in, those patches will follow. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4032 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/romtool/tools/lzma/C/Common/MyGuidDef.h')
-rw-r--r--util/romtool/tools/lzma/C/Common/MyGuidDef.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/util/romtool/tools/lzma/C/Common/MyGuidDef.h b/util/romtool/tools/lzma/C/Common/MyGuidDef.h
new file mode 100644
index 0000000000..889ea417b0
--- /dev/null
+++ b/util/romtool/tools/lzma/C/Common/MyGuidDef.h
@@ -0,0 +1,54 @@
+// Common/MyGuidDef.h
+
+#ifndef GUID_DEFINED
+#define GUID_DEFINED
+
+#include "Types.h"
+
+typedef struct {
+ UInt32 Data1;
+ UInt16 Data2;
+ UInt16 Data3;
+ unsigned char Data4[8];
+} GUID;
+
+#ifdef __cplusplus
+#define REFGUID const GUID &
+#else
+#define REFGUID const GUID *
+#endif
+
+#define REFCLSID REFGUID
+#define REFIID REFGUID
+
+#ifdef __cplusplus
+inline bool operator==(REFGUID g1, REFGUID g2)
+{
+ for (int i = 0; i < (int)sizeof(g1); i++)
+ if (((const unsigned char *)&g1)[i] != ((const unsigned char *)&g2)[i])
+ return false;
+ return true;
+}
+inline bool operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); }
+#endif
+
+#ifdef __cplusplus
+ #define MY_EXTERN_C extern "C"
+#else
+ #define MY_EXTERN_C extern
+#endif
+
+#endif // GUID_DEFINED
+
+
+#ifdef DEFINE_GUID
+#undef DEFINE_GUID
+#endif
+
+#ifdef INITGUID
+ #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+ MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
+#else
+ #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+ MY_EXTERN_C const GUID name
+#endif