[vlc-devel] [PATCH 3/4] Define the some macros to avoid name clashes on OS/2

KO Myung-Hun komh78 at gmail.com
Tue Jan 10 13:07:04 CET 2012


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 6963178..85cc766 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