mkv.cpp: do not spread gcc problems to other compilers
authorSteve Lhomme <robux@videolan.org>
Mon, 21 Feb 2005 07:52:19 +0000 (07:52 +0000)
committerSteve Lhomme <robux@videolan.org>
Mon, 21 Feb 2005 07:52:19 +0000 (07:52 +0000)
modules/demux/mkv.cpp

index 836426a..ea553c3 100644 (file)
@@ -585,12 +585,12 @@ static int Open( vlc_object_t * p_this )
                     if (!s_filename.compare(p_demux->psz_path))
                         continue;
 
-#if __GNUC__ >= 3
-                    if (!s_filename.compare(s_filename.length() - 3, 3, "mkv") || 
-                        !s_filename.compare(s_filename.length() - 3, 3, "mka"))
-#else
+#if defined(__GNUC__) && (__GNUC__ < 3)
                     if (!s_filename.compare("mkv", s_filename.length() - 3, 3) || 
                         !s_filename.compare("mka", s_filename.length() - 3, 3))
+#else
+                    if (!s_filename.compare(s_filename.length() - 3, 3, "mkv") || 
+                        !s_filename.compare(s_filename.length() - 3, 3, "mka"))
 #endif
                     {
                         // test wether this file belongs to the our family