]> git.sesse.net Git - vlc/commitdiff
* src/*: got rid of the #ifdef HAVE_ERRNO_H.
authorGildas Bazin <gbazin@videolan.org>
Mon, 4 Oct 2004 13:34:42 +0000 (13:34 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 4 Oct 2004 13:34:42 +0000 (13:34 +0000)
14 files changed:
src/audio_output/dec.c
src/audio_output/filters.c
src/audio_output/intf.c
src/interface/intf_eject.c
src/libvlc.c
src/misc/beos_specific.cpp
src/misc/charset.c
src/misc/configuration.c
src/misc/error.c
src/misc/httpd.c
src/misc/messages.c
src/misc/modules_plugin.h.in
src/misc/net.c
src/playlist/loadsave.c

index 963568b0b40684953b02dd5c508eda7820b7e476..225c4a3029c5573c0e4582aab251866fb908ad0c 100644 (file)
@@ -2,7 +2,7 @@
  * dec.c : audio output API towards decoders
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: dec.c,v 1.14 2004/01/06 12:02:05 zorglub Exp $
+ * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
index 93d12408546ed9725222388ce97fda37ea865231..502292819601ebe19467efe932c41af15545d926 100644 (file)
@@ -2,7 +2,7 @@
  * filters.c : audio output filters management
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: filters.c,v 1.20 2004/03/03 20:39:52 gbazin Exp $
+ * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
index b598ea4f69298c51a28ccc9e5febeee3b53524c3..3edbc35fdbdf4a964451b8a9432823f510f8acfb 100644 (file)
@@ -2,7 +2,7 @@
  * intf.c : audio output API towards the interface modules
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: intf.c,v 1.20 2004/01/06 12:02:05 zorglub Exp $
+ * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
index 7dd08a095b66edac046b495ba045a857e5bb0faa..3d21111c743fc2a828ac065ec4d2fd8935d0edb3 100644 (file)
@@ -2,7 +2,7 @@
  * intf_eject.c: CD/DVD-ROM ejection handling functions
  *****************************************************************************
  * Copyright (C) 2001-2004 VideoLAN
- * $Id: intf_eject.c,v 1.23 2004/01/06 12:02:06 zorglub Exp $
+ * $Id$
  *
  * Authors: Julien Blache <jb@technologeek.org> for the Linux part
  *                with code taken from the Linux "eject" command
index 8164fa2ef262b476490912bb7d18b72fb7036fa8..12902e26f0ecdd66bac604961a771f3e41ec7457 100644 (file)
@@ -37,9 +37,7 @@
 #include <vlc/vlc.h>
 #include <vlc/input.h>
 
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>                                              /* ENOMEM */
-#endif
+#include <errno.h>                                                 /* ENOMEM */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
 #include <stdlib.h>                                                /* free() */
index 7ddd9fd48d2266cdca8aec57492549efbf58fca1..c8dfc2f03da894c3ce7c39d63bf7d5bd028e633f 100644 (file)
@@ -2,7 +2,7 @@
  * beos_init.cpp: Initialization for BeOS specific features
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: beos_specific.cpp,v 1.37 2004/01/25 17:16:06 zorglub Exp $
+ * $Id$
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *
index 69cfd3e49ccebe44841e106a2188f23820d9da86..02801c2bf461ade2d18e65ce36cd700b353f9919 100644 (file)
@@ -3,7 +3,7 @@
  *            encoding.
  *****************************************************************************
  * Copyright (C) 2003-2004 VideoLAN
- * $Id: charset.c,v 1.6 2004/01/06 12:02:06 zorglub Exp $
+ * $Id$
  *
  * Author: Derk-Jan Hartman <thedj at users.sf.net>
  *
index 46fba05b06e016f5baaff441480cd8c43ef51ded..d3ebdbcc4e67be251000faa088ff31be80b8cddd 100644 (file)
@@ -27,9 +27,7 @@
 #include <stdio.h>                                              /* sprintf() */
 #include <stdlib.h>                                      /* free(), strtol() */
 #include <string.h>                                              /* strdup() */
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>                                               /* errno */
-#endif
+#include <errno.h>                                                  /* errno */
 
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>                                          /* getuid() */
@@ -926,7 +924,7 @@ int config_CreateDir( vlc_object_t *p_this, char *psz_dirname )
         }
     }
 
-#elif defined( HAVE_ERRNO_H )
+#else
 #   if defined( WIN32 )
     if( mkdir( psz_dirname ) && errno != EEXIST )
 #   else
@@ -937,12 +935,6 @@ int config_CreateDir( vlc_object_t *p_this, char *psz_dirname )
                  psz_dirname, strerror(errno) );
     }
 
-#else
-    if( mkdir( psz_dirname ) )
-    {
-        msg_Err( p_this, "could not create %s", psz_dirname );
-    }
-
 #endif
 
     return 0;
index e548d4df48b666c87daa9a0de7dc9fdc125493d0..ebc08771387ca072c606e41d03f16ec426b037ad 100644 (file)
@@ -2,7 +2,7 @@
  * error.c: error handling routine
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: error.c,v 1.4 2004/01/25 17:16:06 zorglub Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
index a850a7cfbfeb73f0bdfa271f532bbea8da9e9beb..ea45f6e8c90af5bd5c1f3707d8d078e1ba61f373 100644 (file)
@@ -31,9 +31,8 @@
 #include "network.h"
 
 #include <string.h>
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>
-#endif
+#include <errno.h>
+
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
@@ -2345,11 +2344,7 @@ static void httpd_HostThread( httpd_host_t *host )
         i_ret = select( i_handle_max + 1,
                         &fds_read, &fds_write, NULL, &timeout );
 
-#if defined( WIN32 ) || defined( UNDER_CE )
-        if( i_ret == -1 )
-#else
         if( i_ret == -1 && errno != EINTR )
-#endif
         {
             msg_Warn( host, "cannot select sockets" );
             msleep( 1000 );
index 589eb66462a521ce0eabadc8f7c1bea7e7b85b65..1ff74c6f76adcbdaa186a0e2127c3b8a66885b6a 100644 (file)
@@ -38,9 +38,7 @@
 #   include <fcntl.h>                  /* O_CREAT, O_TRUNC, O_WRONLY, O_SYNC */
 #endif
 
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>                                               /* errno */
-#endif
+#include <errno.h>                                                  /* errno */
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>                                   /* close(), write() */
@@ -299,12 +297,8 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
 
     if( psz_str == NULL )
     {
-#ifdef HAVE_ERRNO_H
         fprintf( stderr, "main warning: can't store message (%s): ",
                  strerror(errno) );
-#else
-        fprintf( stderr, "main warning: can't store message: " );
-#endif
         vlc_va_copy( args, _args );
         vfprintf( stderr, psz_format, args );
         va_end( args );
index 84ece039898f2cb31569c270f26f01ecdc0322c8..563569e0fc99e0139e41505ba563ec7e118b4405 100644 (file)
@@ -2,7 +2,7 @@
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h.in,v 1.15 2003/10/05 15:35:59 sam Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
index 99c22a538781744803636d537c18c7e36d4bcc29..6f0b870714d877fb52b8bc31bbdc4bc3afd2d637 100644 (file)
@@ -27,9 +27,7 @@
 #include <stdlib.h>
 #include <vlc/vlc.h>
 
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>
-#endif
+#include <errno.h>
 
 #ifdef HAVE_FCNTL_H
 #   include <fcntl.h>
@@ -59,7 +57,6 @@
 
 #include "network.h"
 
-
 /*****************************************************************************
  * __net_OpenTCP:
  *****************************************************************************
@@ -188,11 +185,7 @@ int __net_Accept( vlc_object_t *p_this, int fd, mtime_t i_wait )
         timeout.tv_usec = b_block ? 500000 : i_wait;
 
         i_ret = select(fd + 1, &fds_r, NULL, &fds_e, &timeout);
-#ifdef HAVE_ERRNO_H
         if( (i_ret < 0 && errno == EINTR) || i_ret == 0 )
-#else
-        if( i_ret == 0 )
-#endif
         {
             if( b_block ) continue;
             else return -1;
@@ -333,11 +326,7 @@ int __net_Read( vlc_object_t *p_this, int fd, uint8_t *p_data, int i_data,
             timeout.tv_usec = 500000;
 
         } while( (i_ret = select(fd + 1, &fds_r, NULL, &fds_e, &timeout)) == 0
-#ifdef HAVE_ERRNO_H
                  || ( i_ret < 0 && errno == EINTR ) );
-#else
-                 );
-#endif
 
         if( i_ret < 0 )
         {
@@ -410,11 +399,7 @@ int __net_ReadNonBlock( vlc_object_t *p_this, int fd, uint8_t *p_data,
 
     i_ret = select(fd + 1, &fds_r, NULL, &fds_e, &timeout);
 
-#ifdef HAVE_ERRNO_H
     if( i_ret < 0 && errno == EINTR )
-#else
-    if( 0 )
-#endif
     {
         return 0;
     }
@@ -494,11 +479,7 @@ int __net_Write( vlc_object_t *p_this, int fd, uint8_t *p_data, int i_data )
             timeout.tv_usec = 500000;
 
         } while( (i_ret = select(fd + 1, NULL, &fds_w, &fds_e, &timeout)) == 0
-#ifdef HAVE_ERRNO_H
                  || ( i_ret < 0 && errno == EINTR ) );
-#else
-                 );
-#endif
 
         if( i_ret < 0 )
         {
index 9c5c0da11ae6882787eb4d2fe566df3f78f8c535..8d180af8c888e2d8127054642b90184b7d55846f 100644 (file)
 #include <stdlib.h>                                      /* free(), strtol() */
 #include <stdio.h>                                              /* sprintf() */
 #include <string.h>                                            /* strerror() */
+#include <errno.h>
 
 #include <vlc/vlc.h>
 #include <vlc/vout.h>
 #include <vlc/sout.h>
 #include <vlc/input.h>
 
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>
-#endif
-
 #include "vlc_playlist.h"
 
 #define PLAYLIST_FILE_HEADER  "# vlc playlist file version 0.5"
@@ -97,13 +94,8 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
     p_export->p_file = fopen( psz_filename, "wt" );
     if( !p_export->p_file )
     {
-#ifdef HAVE_ERRNO_H
         msg_Err( p_playlist , "could not create playlist file %s"
                  " (%s)", psz_filename, strerror(errno) );
-#else
-        msg_Err( p_playlist , "could not create playlist file %s"
-                 , psz_filename );
-#endif
         return VLC_EGENERIC;
     }