]> git.sesse.net Git - vlc/commitdiff
Kill dirent.h replacement
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 3 Aug 2010 15:48:11 +0000 (18:48 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 3 Aug 2010 16:21:27 +0000 (19:21 +0300)
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
po/POTFILES.in
src/Makefile.am
src/libvlc.h

index e4d1ffbec33d997cc94dc984d3aa834d9409bd4f..d9da6a9df445ad4c9bea2876c5d8fff8c6cdde8a 100644 (file)
@@ -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
index c2accc10c0daa665eea403cb63286204258bb69b..32c7bb2b5dcbaa911517ef907e6ca9303aa03460 100644 (file)
@@ -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
index f46a154e2e160b4f0d79e9731ab5bfc11e48a1aa..00da87aa9c4994ef9839e80d180952d0c964c658 100644 (file)
@@ -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 = \
index 11263e33e0493fde1f57200ff813322e07ef42b0..89824146bd299ee4c81f297e41776472687a3dff 100644 (file)
@@ -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 *);