[vlc-commits] commit: Kill dirent.h replacement ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Tue Aug 3 18:21:39 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 3 18:48:11 2010 +0300| [744ff759b3e319b47fb4b2b58fac8e5d9d684d7a] | committer: Rémi Denis-Courmont
Kill dirent.h replacement
While the configure checks were platform-agnostic, the implementation
was Windows-specific. Worse, this code now conflicts with our Unicode
filesystem layer, which uses the same function names. In practice, this
code was never used.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=744ff759b3e319b47fb4b2b58fac8e5d9d684d7a
---
configure.ac | 4 +---
po/POTFILES.in | 1 -
src/Makefile.am | 9 ---------
src/libvlc.h | 22 ----------------------
4 files changed, 1 insertions(+), 35 deletions(-)
diff --git a/configure.ac b/configure.ac
index e4d1ffb..d9da6a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -828,9 +828,7 @@ fi
])
dnl Check for dirent
-need_dirent=false
-AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
-AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
+AC_CHECK_HEADERS(dirent.h)
dnl Mac OS X and other OSes don't have declaration for nanosleep
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c2accc1..32c7bb2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -94,7 +94,6 @@ src/control/media_player.c
src/control/playlist.c
src/control/video.c
src/control/vlm.c
-src/extras/dirent.c
src/extras/libc.c
src/extras/tdestroy.c
src/input/access.c
diff --git a/src/Makefile.am b/src/Makefile.am
index f46a154..00da87a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -232,7 +232,6 @@ EXTRA_libvlccore_la_SOURCES = \
$(SOURCES_libvlc_linux) \
$(SOURCES_libvlc_win32) \
$(SOURCES_libvlc_other) \
- $(SOURCES_libvlc_dirent) \
$(SOURCES_libvlc_httpd) \
$(SOURCES_libvlc_sout) \
$(SOURCES_libvlc_vlm) \
@@ -258,9 +257,6 @@ endif
endif
endif
endif
-if BUILD_DIRENT
-libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
-endif
if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif
@@ -304,10 +300,6 @@ SOURCES_libvlc_other = \
misc/pthread.c \
misc/not_specific.c
-SOURCES_libvlc_dirent = \
- extras/dirent.c \
- $(NULL)
-
SOURCES_libvlc_common = \
libvlc.c \
libvlc.h \
@@ -494,7 +486,6 @@ SOURCES_libvlc = \
$(OPT_SOURCES_libvlc_beos) \
$(OPT_SOURCES_libvlc_darwin) \
$(OPT_SOURCES_libvlc_win32) \
- $(OPT_SOURCES_libvlc_dirent) \
$(NULL)
SOURCES_libvlc_control = \
diff --git a/src/libvlc.h b/src/libvlc.h
index 11263e3..8982414 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -327,28 +327,6 @@ VLC_EXPORT( void, stats_DumpInputStats, (input_stats_t *) );
/*
* Replacement functions
*/
-# ifndef HAVE_DIRENT_H
-typedef void DIR;
-# ifndef FILENAME_MAX
-# define FILENAME_MAX (260)
-# endif
-struct dirent
-{
- long d_ino; /* Always zero. */
- unsigned short d_reclen; /* Always zero. */
- unsigned short d_namlen; /* Length of name in d_name. */
- char d_name[FILENAME_MAX]; /* File name. */
-};
-# define opendir vlc_opendir
-# define readdir vlc_readdir
-# define closedir vlc_closedir
-# define rewinddir vlc_rewindir
-void *vlc_opendir (const char *);
-void *vlc_readdir (void *);
-int vlc_closedir(void *);
-void vlc_rewinddir(void *);
-# endif
-
#if defined (WIN32)
# include <dirent.h>
void *vlc_wopendir (const wchar_t *);
More information about the vlc-commits
mailing list