]> git.sesse.net Git - vlc/commitdiff
* src/playlist/loadsave.c: errno.h related fixes.
authorGildas Bazin <gbazin@videolan.org>
Thu, 22 Jan 2004 19:35:14 +0000 (19:35 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 22 Jan 2004 19:35:14 +0000 (19:35 +0000)
* modules/demux/Modules.am: added missing ps.h.

modules/demux/Modules.am
src/playlist/loadsave.c

index e84b53749bcdccd21c614791412cc4de10d070a8..0b7bb554005665c26d0d7cafd549b8db294aeb06 100644 (file)
@@ -15,6 +15,6 @@ SOURCES_demux2 = demux2.c
 SOURCES_nsv = nsv.c
 SOURCES_real = real.c
 SOURCES_ts2 = ts.c
-SOURCES_ps2 = ps.c
+SOURCES_ps2 = ps.c ps.h
 SOURCES_dvdnav = dvdnav.c
 SOURCES_mod = mod.c
index 41cc826126c12275e8ff8bdd88ffa9d040b2e714..064f0533b1eb90db4b61b703b1ee6e45cb4affd8 100644 (file)
@@ -2,7 +2,7 @@
  * loadsave.c : Playlist loading / saving functions
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: loadsave.c,v 1.5 2004/01/12 21:22:23 hartman Exp $
+ * $Id: loadsave.c,v 1.6 2004/01/22 19:35:14 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 #include <vlc/vout.h>
 #include <vlc/sout.h>
 
+#ifdef HAVE_ERRNO_H
+#   include <errno.h>
+#endif
+
 #include "stream_control.h"
 #include "input_ext-intf.h"
 
@@ -89,7 +93,6 @@ int playlist_Import( playlist_t * p_playlist, const char *psz_filename )
 int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
                      const char *psz_type)
 {
-    extern int errno;
     module_t *p_module;
     playlist_export_t *p_export;
 
@@ -105,9 +108,13 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
     p_export->p_file = fopen( psz_filename, "wt" );
     if( !p_export->p_file )
     {
-        msg_Err( p_playlist , "Could not create playlist file %s (%s)"
-                , psz_filename, strerror(errno) );
-        return -1;
+        msg_Err( p_playlist , "Could not create playlist file %s"
+#ifdef HAVE_ERRNO_H
+                 " (%s)", psz_filename, strerror(errno) );
+#else
+                 , psz_filename );
+#endif
+        return VLC_EGENERIC;
     }
 
     p_playlist->p_private = (void *)p_export;