[vlc-devel] [PATCH 02/11] Define the some macros to avoid name clashes on OS/2.

KO Myung-Hun komh at chollian.net
Sun Nov 6 10:58:21 CET 2011


They are

    #define BITMAPINFOHEADER    VLC_BITMAPINFOHEADER
    #define PBITMAPINFOHEADER   VLC_PBITMAPINFOHEADER
    #define LPBITMAPINFOHEADER  VLC_LPBITMAPINFOHEADER
    #define BITMAPINFO          VLC_BITMAPINFO
    #define LPBITMAPINFO        VLC_LPBITMAPINFO

OS/2 has already the types of the same name, but the different member name.
---
 include/vlc_codecs.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
index 9fafdd4..8126f4f 100644
--- a/include/vlc_codecs.h
+++ b/include/vlc_codecs.h
@@ -108,6 +108,16 @@ _WAVEHEADER {
 
 #if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
 #define _BITMAPINFOHEADER_
+
+#ifdef __OS2__
+/* OS/2 has the types having the same name */
+#define BITMAPINFOHEADER    VLC_BITMAPINFOHEADER
+#define PBITMAPINFOHEADER   VLC_PBITMAPINFOHEADER
+#define LPBITMAPINFOHEADER  VLC_LPBITMAPINFOHEADER
+#define BITMAPINFO          VLC_BITMAPINFO
+#define LPBITMAPINFO        VLC_LPBITMAPINFO
+#endif
+
 typedef struct
 ATTR_PACKED
 {
-- 
1.7.3.2



More information about the vlc-devel mailing list