-#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
-# define seekdir vlc_seekdir
-# define telldir vlc_telldir
- VLC_EXPORT( void *, vlc_opendir, ( const char * ) );
- VLC_EXPORT( void *, vlc_readdir, ( void * ) );
- VLC_EXPORT( int, vlc_closedir, ( void * ) );
- VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
- VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
- VLC_INTERNAL( long, vlc_telldir, ( void * ) );
-#endif
-
-#if defined (WIN32)
-# include <dirent.h>
- VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) );
- VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) );
- VLC_EXPORT( int, vlc_wclosedir, ( void * ) );
- VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
- VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
- VLC_INTERNAL( long, vlc_telldir, ( void * ) );
-# define opendir Use_utf8_opendir_or_vlc_wopendir_instead!
-# define readdir Use_utf8_readdir_or_vlc_wreaddir_instead!
-# define closedir vlc_wclosedir
-# define _wopendir vlc_wopendir
-# define _wreaddir vlc_wreaddir
-# define _wclosedir vlc_wclosedir
-# define rewinddir vlc_rewinddir
-# define seekdir vlc_seekdir
-# define telldir vlc_telldir
-#endif
-
-/* Format type specifiers for 64 bits numbers */
-#if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE))
-# if defined(__WORDSIZE) && __WORDSIZE == 64
-# define I64Fd "%ld"
-# define I64Fi "%li"
-# define I64Fo "%lo"
-# define I64Fu "%lu"
-# define I64Fx "%lx"
-# define I64FX "%lX"
-# else
-# define I64Fd "%lld"
-# define I64Fi "%lli"
-# define I64Fo "%llo"
-# define I64Fu "%llu"
-# define I64Fx "%llx"
-# define I64FX "%llX"
-# endif
-#else
-# define I64Fd "%I64d"
-# define I64Fi "%I64i"
-# define I64Fo "%I64o"
-# define I64Fu "%I64u"
-# define I64Fx "%I64x"
-# define I64FX "%I64X"
-#endif /* defined(WIN32)||defined(UNDER_CE) */
-
-/* 64 bits integer constant suffix */
-#if defined( __MINGW32__ ) || (!defined(WIN32) && !defined(UNDER_CE))
-# if defined(__WORDSIZE) && __WORDSIZE == 64
-# define I64C(x) x##L
-# define UI64C(x) x##UL
-# else
-# define I64C(x) x##LL
-# define UI64C(x) x##ULL
-# endif
-#else
-# define I64C(x) x##i64
-# define UI64C(x) x##ui64
-#endif /* defined(WIN32)||defined(UNDER_CE) */
-