Commit 86f50fed authored by Gildas Bazin's avatar Gildas Bazin

* src/*: got rid of the #ifdef HAVE_ERRNO_H.

parent d37438b1
......@@ -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>
*
......
......@@ -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>
*
......
......@@ -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>
*
......
......@@ -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
......
......@@ -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() */
......
......@@ -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>
*
......
......@@ -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>
*
......
......@@ -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;
......
......@@ -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>
*
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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>
*
......
......@@ -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 )
{
......
......@@ -23,16 +23,13 @@
#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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment