From beee3221da8d2f81ff6142269d875ea59e6fd5f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 1 May 2008 23:11:42 +0300 Subject: [PATCH] Move dirent stuff to fixups.h, where it belongs --- include/vlc_common.h | 26 -------------------------- include/vlc_fixups.h | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index 60406f2029..05d98ac54c 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -773,32 +773,6 @@ VLC_EXPORT( int, vlc_strcasecmp, ( const char *s1, const char *s2 ) ); VLC_EXPORT( int, vlc_strncasecmp, ( const char *s1, const char *s2, size_t n ) ); VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) ); -#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 VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) ); diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index fa50cb650d..98c167a46a 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -121,4 +121,30 @@ static inline struct tm *localtime_r (const time_t *timep, struct tm *result) } #endif +#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 + #endif /* !LIBVLC_FIXUPS_H */ -- 2.39.2