]> git.sesse.net Git - vlc/commitdiff
Remove inconsistently used check for <sys/stat.h>
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 27 Jan 2012 21:06:50 +0000 (23:06 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 27 Jan 2012 21:31:49 +0000 (23:31 +0200)
21 files changed:
configure.ac
modules/access/bd/bd.c
modules/access/directory.c
modules/access/dvdnav.c
modules/access/file.c
modules/access/mtp.c
modules/access/smb.c
modules/access/vcd/cdrom.c
modules/access/vdr.c
modules/demux/mp4/drms.c
modules/gui/ncurses.c
modules/gui/skins2/parser/xmlparser.cpp
modules/gui/skins2/src/theme_loader.cpp
modules/lua/libs/net.c
modules/media_library/sql_media_library.h
modules/meta_engine/folder.c
modules/misc/gnutls.c
src/input/es_out_timeshift.c
src/input/input.c
src/modules/bank.c
src/playlist/art.c

index c0efd80d418fc85fcdfc4e00ab64c3a4a74dfd1f..dc11ac033937eb87e5ae24ad1d7b9782ab9e20a6 100644 (file)
@@ -666,7 +666,7 @@ fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
 dnl Check for headers
 AC_CHECK_HEADERS([search.h])
 AC_CHECK_HEADERS(getopt.h locale.h xlocale.h)
-AC_CHECK_HEADERS([sys/time.h sys/ioctl.h sys/stat.h])
+AC_CHECK_HEADERS([sys/time.h sys/ioctl.h])
 AC_CHECK_HEADERS([arpa/inet.h netinet/udplite.h sys/eventfd.h])
 AC_CHECK_HEADERS([net/if.h], [], [],
   [
index 536d0111105c148fb378d37319cfe277fd97d57c..f70df38c3df86f20902c4da942dc00cc6f447296 100644 (file)
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
 #include <limits.h>
+#include <sys/stat.h>
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
index f958e12cc4a0a4d5a2b19ea690867f4124877161..8683d93c03fe8551fd2c6e7f06bca55006ed3b34 100644 (file)
 #include <vlc_access.h>
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
-
+#include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #   include <fcntl.h>
index e7f4a03b85d0de0ed2a7b85aeb3318123c4f2dd1..181708375df2641f1893119e8836d7de49cb5ebb 100644 (file)
@@ -34,9 +34,7 @@
 #   include <unistd.h>
 #endif
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
 
@@ -1452,20 +1450,17 @@ static int ProbeDVD( const char *psz_name )
 #endif
 
     int ret = VLC_EGENERIC;
-
-#ifdef HAVE_SYS_STAT_H
     struct stat stat_info;
 
     if( fstat( fd, &stat_info ) == -1 )
          goto bailout;
-
     if( !S_ISREG( stat_info.st_mode ) )
     {
         if( S_ISDIR( stat_info.st_mode ) || S_ISBLK( stat_info.st_mode ) )
             ret = VLC_SUCCESS; /* Let dvdnav_open() do the probing */
         goto bailout;
     }
-#endif
+
     /* Match extension as the anchor exhibits too many false positives */
     const char *ext = strrchr( psz_name, '.' );
     if( ext == NULL )
index 8f3a4a53e18ad2458348b45e9a2a6a9faff8fce4..487c146d82ca9e6a9071f0bcdf25c7b041121806 100644 (file)
@@ -30,9 +30,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <fcntl.h>
 #ifdef HAVE_FSTATVFS
 #   include <sys/statvfs.h>
@@ -313,7 +311,6 @@ ssize_t FileRead( access_t *p_access, uint8_t *p_buffer, size_t i_len )
     if ((p_access->info.i_size && !(p_sys->i_nb_reads % INPUT_FSTAT_NB_READS))
      || (p_access->info.i_pos > p_access->info.i_size))
     {
-#ifdef HAVE_SYS_STAT_H
         struct stat st;
 
         if ((fstat (fd, &st) == 0)
@@ -322,7 +319,6 @@ ssize_t FileRead( access_t *p_access, uint8_t *p_buffer, size_t i_len )
             p_access->info.i_size = st.st_size;
             p_access->info.i_update |= INPUT_UPDATE_SIZE;
         }
-#endif
     }
     return i_ret;
 }
index e51f418370b3d1ac31d3aa57d5cb3a194ea78925..bbbbf4d1e396f809e8b7c66dadbc5b6ac203fda7 100644 (file)
@@ -33,9 +33,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <poll.h>
@@ -158,14 +156,10 @@ static int Open( vlc_object_t *p_this )
     }
     p_sys->fd = fd;
 
-#ifdef HAVE_SYS_STAT_H
     struct stat st;
     if( fstat( fd, &st ) )
         msg_Err( p_access, "fstat(%d): %m", fd );
     p_access->info.i_size = st.st_size;
-#else
-# warning File size not known!
-#endif
 
     return VLC_SUCCESS;
 }
index 6ece3e05b17805c51de2fa7732d30e7d0d6ecc3e..8bf0cab0c8a0ee597bde5c509c2a2d9c395be5d3 100644 (file)
@@ -31,9 +31,7 @@
 #include <errno.h>
 #ifdef WIN32
 #   include <fcntl.h>
-#   ifdef HAVE_SYS_STAT_H
-#       include <sys/stat.h>
-#   endif
+#   include <sys/stat.h>
 #   include <io.h>
 #   define smbc_open(a,b,c) vlc_open(a,b,c)
 #   define smbc_fstat(a,b) _fstati64(a,b)
index 0fd02635cd55510fa469088ba410851073054d20..2b6746680d0b75b6ce4b9e9a887ba4c8ed0ccc0a 100644 (file)
@@ -38,9 +38,7 @@
 #   include <unistd.h>
 #endif
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <fcntl.h>
 #ifdef HAVE_ARPA_INET_H
 #   include <arpa/inet.h>
index 8889490f3449f7dfd150a7dfae680ca6cd0ea248..79653bf7c3f3c922621be950c1c4c0e0917fea83 100644 (file)
@@ -46,9 +46,7 @@ See http://www.vdr-wiki.de/ and http://www.tvdr.de/ for more information.
 #endif
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
index eb312b0617cb7390067825e7a668aeeb4ad089e8..c64ad2d6c9cb3110f1890567a64a09c4360a48ff 100644 (file)
@@ -41,9 +41,7 @@
 #endif
 #include <errno.h>
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #include <vlc_common.h>
 #include <vlc_md5.h>
index 2c0ceb2022af6682c98899edc194aa915d19592a..ec5319e0b7e7b18dad010c95a9ccd08224875cb7 100644 (file)
@@ -38,9 +38,7 @@
 
 #include <assert.h>
 #include <wchar.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
index f660e28afebd131fe8b7a369db2cc36897e0c4a1..bbb40c301762cbd8d2f48dad1f476a02dad9a358 100644 (file)
@@ -25,9 +25,7 @@
 #include "../src/os_factory.hpp"
 #include <vlc_url.h>
 
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName )
     : SkinObject( pIntf ), m_pXML( NULL ), m_pReader( NULL ), m_pStream( NULL )
@@ -79,7 +77,6 @@ void XMLParser::LoadCatalog()
     const string &sep = pOSFactory->getDirSeparator();
     list<string>::const_iterator it;
 
-#ifdef HAVE_SYS_STAT_H
     struct stat statBuf;
 
     // Try to load the catalog first (needed at least on win32 where
@@ -119,7 +116,6 @@ void XMLParser::LoadCatalog()
     {
         msg_Err( getIntf(), "cannot find the skins DTD");
     }
-#endif
 }
 
 bool XMLParser::parse()
index d76eae521a6f2f01f8064ceb43aba8388d9b8ad6..c72c63047a53f8c93acff2c5b307d7b6aa8761ba 100644 (file)
@@ -27,9 +27,7 @@
 #endif
 
 #include <fcntl.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
index 33e3750c7d06d3d39593d0d524275d443d6b2b0c..ea6124598c7e9cd8bfdd2674a1213846993c6f6a 100644 (file)
@@ -271,7 +271,6 @@ static int vlclua_fd_read( lua_State *L )
  *****************************************************************************/
 static int vlclua_stat( lua_State *L )
 {
-#ifdef HAVE_SYS_STAT_H
     const char *psz_path = luaL_checkstring( L, 1 );
     struct stat s;
     if( vlc_stat( psz_path, &s ) )
@@ -320,10 +319,6 @@ static int vlclua_stat( lua_State *L )
     lua_pushinteger( L, s.st_ctime );
     lua_setfield( L, -2, "creation_time" );
     return 1;
-#else
-#   warning "Woops, looks like we don't have stat on your platform"
-    return luaL_error( L, "System is missing <sys/stat.h>" );
-#endif
 }
 
 static int vlclua_opendir( lua_State *L )
index 572394e2202bd6aa41230860288a95f0103dc838..705c0a02a384a55d8075f7a20432f87f34994f1b 100644 (file)
@@ -31,9 +31,7 @@
 #include <stdarg.h>
 #include <assert.h>
 #include <errno.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #include <vlc_common.h>
 #include <vlc_sql.h>
index 724bae6b004d80dbae93752843bd8f577f93b78c..7ca42566d16c6d67d3e96d2b4d7ef9cf2087a6cb 100644 (file)
@@ -29,9 +29,7 @@
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
index 78771eb44d4e16e84815f7f9cb20a800232303e8..b6b18955c90f41aba0ff24169263b579081df705 100644 (file)
@@ -31,9 +31,7 @@
 #include <sys/types.h>
 #include <errno.h>
 
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #ifdef WIN32
 # include <io.h>
 # include <wincrypt.h>
index ca4d8d01ecca28b20235f7086b0264d29af1f103..9a8b82d3be79d26f90ff4b49da9799a5048bb5aa 100644 (file)
@@ -34,9 +34,7 @@
 #if defined (WIN32) && !defined (UNDER_CE)
 #  include <direct.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index 445dc142e77c0adbf55722f6caabbf05b1ac57f4..b6e5bd23aafc008e984d631e4a0b0c04fd05830f 100644 (file)
@@ -34,9 +34,7 @@
 #include <limits.h>
 #include <assert.h>
 #include <errno.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #include "input_internal.h"
 #include "event.h"
index 5e79094a08a954ba728dcfb541655f3e72d1aa8a..e074fef17c69f2bbb8a42b1ae8dc99573cce371c 100644 (file)
@@ -34,9 +34,7 @@
 #include <assert.h>
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
 #endif
index 08c794ebf654754b2d72bd1775e79e1afaf98349..dc71212b62ac7bd68eaff9011ce3bccc775a2dad 100644 (file)
@@ -27,9 +27,7 @@
 #endif
 
 #include <assert.h>
-#ifdef HAVE_SYS_STAT_H
-#   include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #include <vlc_common.h>
 #include <vlc_playlist.h>