From 744ff759b3e319b47fb4b2b58fac8e5d9d684d7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 3 Aug 2010 18:48:11 +0300 Subject: [PATCH] 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. --- configure.ac | 4 +--- po/POTFILES.in | 1 - src/Makefile.am | 9 --------- src/libvlc.h | 22 ---------------------- 4 files changed, 1 insertion(+), 35 deletions(-) diff --git a/configure.ac b/configure.ac index e4d1ffbec3..d9da6a9df4 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 c2accc10c0..32c7bb2b5d 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 f46a154e2e..00da87aa9c 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 11263e33e0..89824146bd 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 void *vlc_wopendir (const wchar_t *); -- 2.39.2