[MPlayer-cvslog] r21721 - trunk/stream/stream_file.c

nicodvb subversion at mplayerhq.hu
Thu Dec 21 23:40:51 CET 2006


Author: nicodvb
Date: Thu Dec 21 23:40:51 2006
New Revision: 21721

Modified:
   trunk/stream/stream_file.c

Log:
fix compilation on the most delicious variant of unix (mingw) that lacks S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH

Modified: trunk/stream/stream_file.c
==============================================================================
--- trunk/stream/stream_file.c	(original)
+++ trunk/stream/stream_file.c	Thu Dec 21 23:40:51 2006
@@ -135,8 +135,13 @@
   } else {
     if(mode == STREAM_READ)
       f=open(filename,m);
-    else
-      f=open(filename,m, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+    else {
+      mode_t openmode = S_IRUSR|S_IWUSR;
+#ifndef __MINGW32__
+      openmode |= S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
+#endif
+      f=open(filename,m, openmode);
+    }
     if(f<0) {
       mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename);
       m_struct_free(&stream_opts,opts);



More information about the MPlayer-cvslog mailing list