Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
75d005cf
Commit
75d005cf
authored
Jan 27, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove inconsistently used check for <sys/stat.h>
parent
d191a555
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
21 additions
and
76 deletions
+21
-76
configure.ac
configure.ac
+1
-1
modules/access/bd/bd.c
modules/access/bd/bd.c
+1
-3
modules/access/directory.c
modules/access/directory.c
+1
-4
modules/access/dvdnav.c
modules/access/dvdnav.c
+2
-7
modules/access/file.c
modules/access/file.c
+1
-5
modules/access/mtp.c
modules/access/mtp.c
+1
-7
modules/access/smb.c
modules/access/smb.c
+1
-3
modules/access/vcd/cdrom.c
modules/access/vcd/cdrom.c
+1
-3
modules/access/vdr.c
modules/access/vdr.c
+1
-3
modules/demux/mp4/drms.c
modules/demux/mp4/drms.c
+1
-3
modules/gui/ncurses.c
modules/gui/ncurses.c
+1
-3
modules/gui/skins2/parser/xmlparser.cpp
modules/gui/skins2/parser/xmlparser.cpp
+1
-5
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+1
-3
modules/lua/libs/net.c
modules/lua/libs/net.c
+0
-5
modules/media_library/sql_media_library.h
modules/media_library/sql_media_library.h
+1
-3
modules/meta_engine/folder.c
modules/meta_engine/folder.c
+1
-3
modules/misc/gnutls.c
modules/misc/gnutls.c
+1
-3
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+1
-3
src/input/input.c
src/input/input.c
+1
-3
src/modules/bank.c
src/modules/bank.c
+1
-3
src/playlist/art.c
src/playlist/art.c
+1
-3
No files found.
configure.ac
View file @
75d005cf
...
...
@@ -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], [], [],
[
...
...
modules/access/bd/bd.c
View file @
75d005cf
...
...
@@ -29,10 +29,8 @@
# 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>
...
...
modules/access/directory.c
View file @
75d005cf
...
...
@@ -35,10 +35,7 @@
#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>
...
...
modules/access/dvdnav.c
View file @
75d005cf
...
...
@@ -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
)
...
...
modules/access/file.c
View file @
75d005cf
...
...
@@ -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
;
}
...
...
modules/access/mtp.c
View file @
75d005cf
...
...
@@ -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
;
}
...
...
modules/access/smb.c
View file @
75d005cf
...
...
@@ -31,9 +31,7 @@
#include <errno.h>
#ifdef WIN32
# include <fcntl.h>
# ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
# endif
# include <io.h>
# define smbc_open(a,b,c) vlc_open(a,b,c)
# define smbc_fstat(a,b) _fstati64(a,b)
...
...
modules/access/vcd/cdrom.c
View file @
75d005cf
...
...
@@ -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>
...
...
modules/access/vdr.c
View file @
75d005cf
...
...
@@ -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>
...
...
modules/demux/mp4/drms.c
View file @
75d005cf
...
...
@@ -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>
...
...
modules/gui/ncurses.c
View file @
75d005cf
...
...
@@ -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>
...
...
modules/gui/skins2/parser/xmlparser.cpp
View file @
75d005cf
...
...
@@ -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
()
...
...
modules/gui/skins2/src/theme_loader.cpp
View file @
75d005cf
...
...
@@ -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
...
...
modules/lua/libs/net.c
View file @
75d005cf
...
...
@@ -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
)
...
...
modules/media_library/sql_media_library.h
View file @
75d005cf
...
...
@@ -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>
...
...
modules/meta_engine/folder.c
View file @
75d005cf
...
...
@@ -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>
...
...
modules/misc/gnutls.c
View file @
75d005cf
...
...
@@ -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>
...
...
src/input/es_out_timeshift.c
View file @
75d005cf
...
...
@@ -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
...
...
src/input/input.c
View file @
75d005cf
...
...
@@ -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"
...
...
src/modules/bank.c
View file @
75d005cf
...
...
@@ -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
...
...
src/playlist/art.c
View file @
75d005cf
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment