Commit 744ff759 authored by Rémi Denis-Courmont's avatar 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.
parent 7c39812c
......@@ -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
......
......@@ -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
......
......@@ -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 = \
......
......@@ -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 *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment