Protect ole2.h against ole.h.


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@279 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/mapidefs.h b/mingw-w64-headers/include/mapidefs.h
index c9c2ce1..3fff962 100644
--- a/mingw-w64-headers/include/mapidefs.h
+++ b/mingw-w64-headers/include/mapidefs.h
@@ -9,7 +9,7 @@
 #ifndef _WINDOWS_
 #define INC_OLE2
 #define INC_RPC
-#define _INC_OLE
+#define _OLE_H_
 #include <windows.h>
 #endif
 
diff --git a/mingw-w64-headers/include/ole.h b/mingw-w64-headers/include/ole.h
index 8a15b96..164b20b 100644
--- a/mingw-w64-headers/include/ole.h
+++ b/mingw-w64-headers/include/ole.h
@@ -3,8 +3,12 @@
  * This file is part of the w64 mingw-runtime package.
  * No warranty is given; refer to the file DISCLAIMER within this package.
  */
-#ifndef _INC_OLE
-#define _INC_OLE
+#ifndef _OLE_H_
+#define _OLE_H_
+
+#ifdef _OLE2_H_
+#error You can't use ole.h and ole2.h together.
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -156,15 +160,21 @@
     LPOLECLIENTVTBL lpvtbl;
   } OLECLIENT;
 
+#ifndef _DEFINED_OLESTREAMVRBL
+#define _DEFINED_OLESTREAMVRBL
   typedef struct _OLESTREAMVTBL {
     DWORD (CALLBACK *Get)(LPOLESTREAM,void *,DWORD);
     DWORD (CALLBACK *Put)(LPOLESTREAM,const void *,DWORD);
   } OLESTREAMVTBL;
   typedef OLESTREAMVTBL *LPOLESTREAMVTBL;
+#endif
 
+#ifndef _DEFINED_OLESTREAM
+#define _DEFINED_OLESTREAM
   typedef struct _OLESTREAM {
     LPOLESTREAMVTBL lpstbl;
   } OLESTREAM;
+#endif
 
   OLESTATUS WINAPI OleDelete(LPOLEOBJECT);
   OLESTATUS WINAPI OleRelease(LPOLEOBJECT);
@@ -279,4 +289,5 @@
 #ifdef __cplusplus
 }
 #endif
-#endif
+
+#endif /* _OLE_H_ */
diff --git a/mingw-w64-headers/include/ole2.h b/mingw-w64-headers/include/ole2.h
index 1ab032e..af5790c 100644
--- a/mingw-w64-headers/include/ole2.h
+++ b/mingw-w64-headers/include/ole2.h
@@ -99,16 +99,22 @@
 
 typedef struct _OLESTREAM *LPOLESTREAM;
 
+#ifndef _DEFINED_OLESTREAMVRBL
+#define _DEFINED_OLESTREAMVRBL
 typedef struct _OLESTREAMVTBL {
   DWORD (CALLBACK *Get)(LPOLESTREAM,void *,DWORD);
   DWORD (CALLBACK *Put)(LPOLESTREAM,const void *,DWORD);
 } OLESTREAMVTBL;
 
 typedef OLESTREAMVTBL *LPOLESTREAMVTBL;
+#endif
 
+#ifndef _DEFINED_OLESTREAM
+#define _DEFINED_OLESTREAM
 typedef struct _OLESTREAM {
   LPOLESTREAMVTBL lpstbl;
 } OLESTREAM;
+#endif
 
 WINOLEAPI OleConvertOLESTREAMToIStorage(LPOLESTREAM lpolestream,LPSTORAGE pstg,const DVTARGETDEVICE *ptd);
 WINOLEAPI OleConvertIStorageToOLESTREAM(LPSTORAGE pstg,LPOLESTREAM lpolestream);
diff --git a/mingw-w64-headers/include/wabdefs.h b/mingw-w64-headers/include/wabdefs.h
index f7aa011..32d9167 100644
--- a/mingw-w64-headers/include/wabdefs.h
+++ b/mingw-w64-headers/include/wabdefs.h
@@ -13,7 +13,7 @@
 #ifndef _WINDOWS_
 #define INC_OLE2
 #define INC_RPC
-#define _INC_OLE
+#define _OLE_H_
 #include <windows.h>
 #endif