[vlc-commits] commit: Do not export vlc_wclosedir() ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Tue Aug 3 18:21:39 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 3 19:16:45 2010 +0300| [04ad4fc735a909c6e3f100c90bcc5efc4a2bf0c1] | committer: Rémi Denis-Courmont
Do not export vlc_wclosedir()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04ad4fc735a909c6e3f100c90bcc5efc4a2bf0c1
---
include/vlc_common.h | 3 ---
include/vlc_fixups.h | 7 -------
src/extras/libc.c | 13 +++----------
src/libvlc.h | 2 +-
src/libvlccore.sym | 1 -
src/misc/block.c | 1 +
src/text/strings.c | 3 +++
src/text/unicode.c | 1 +
8 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/include/vlc_common.h b/include/vlc_common.h
index 20dfbc9..68db925 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -845,9 +845,6 @@ VLC_EXPORT( int, vlc_iconv_close, ( vlc_iconv_t ) );
VLC_EXPORT( int, vlc_execve, ( vlc_object_t *p_object, int i_argc, char *const *pp_argv, char *const *pp_env, const char *psz_cwd, const char *p_in, size_t i_in, char **pp_data, size_t *pi_data ) LIBVLC_USED );
#define vlc_execve(a,b,c,d,e,f,g,h,i) vlc_execve(VLC_OBJECT(a),b,c,d,e,f,g,h,i)
-/* dir wrappers (defined in src/extras/libc.c) */
-VLC_EXPORT(int, vlc_wclosedir, ( void *_p_dir ));
-
VLC_EXPORT( void, vlc_tdestroy, ( void *, void (*)(void *) ) );
/* Fast large memory copy and memory set */
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 25102fa..46da6ae 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -197,13 +197,6 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
}
#endif
-#ifdef WIN32
-# include <dirent.h>
-# define opendir Use_vlc_opendir_or_vlc_wopendir_instead!
-# define readdir Use_vlc_readdir_or_vlc_wreaddir_instead!
-# define closedir vlc_wclosedir
-#endif
-
/* libintl support */
#define _(str) vlc_gettext (str)
#define N_(str) gettext_noop (str)
diff --git a/src/extras/libc.c b/src/extras/libc.c
index b0d17d1..1636018 100644
--- a/src/extras/libc.c
+++ b/src/extras/libc.c
@@ -32,7 +32,6 @@
#include <vlc_common.h>
#include <errno.h>
-#include <dirent.h>
#undef iconv_t
#undef iconv_open
@@ -55,12 +54,9 @@
#endif
#if defined(WIN32) || defined(UNDER_CE)
-# undef _wopendir
-# undef _wreaddir
-# undef _wclosedir
-# undef rewinddir
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+# include <dirent.h>
#endif
/*****************************************************************************
@@ -167,12 +163,10 @@ void vlc_rewinddir( void *_p_dir )
if ( p_dir->p_real_dir != NULL )
_wrewinddir( p_dir->p_real_dir );
}
-#endif
/* This one is in the libvlccore exported symbol list */
int vlc_wclosedir( void *_p_dir )
{
-#if defined(WIN32)
vlc_DIR *p_dir = (vlc_DIR *)_p_dir;
int i_ret = 0;
@@ -181,10 +175,9 @@ int vlc_wclosedir( void *_p_dir )
free( p_dir );
return i_ret;
-#else
- return closedir( _p_dir );
-#endif
}
+#endif
+
#ifdef ENABLE_NLS
# include <libintl.h>
diff --git a/src/libvlc.h b/src/libvlc.h
index 8982414..02bdfaa 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -330,7 +330,7 @@ VLC_EXPORT( void, stats_DumpInputStats, (input_stats_t *) );
#if defined (WIN32)
# include <dirent.h>
void *vlc_wopendir (const wchar_t *);
-/* void *vlc_wclosedir (void *); in vlc's exported symbols */
+void *vlc_wclosedir (void *);
struct _wdirent *vlc_wreaddir (void *);
void vlc_rewinddir (void *);
# define _wopendir vlc_wopendir
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 494dd35..6b293c8 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -615,7 +615,6 @@ vlc_timer_getoverrun
vlc_timer_schedule
vlc_ureduce
VLC_Version
-vlc_wclosedir
vlc_epg_Init
vlc_epg_Clean
vlc_epg_New
diff --git a/src/misc/block.c b/src/misc/block.c
index 7649d7a..efa4fce 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -362,6 +362,7 @@ block_t *block_mmap_Alloc (void *addr, size_t length)
#ifdef WIN32
+# include <io.h>
#ifdef UNDER_CE
#define _get_osfhandle(a) ((long) (a))
#endif
diff --git a/src/text/strings.c b/src/text/strings.c
index a53907d..096f72d 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -1026,6 +1026,9 @@ void path_sanitize( char *str )
}
#include <vlc_url.h>
+#ifdef WIN32
+# include <io.h>
+#endif
/**
* Convert a file path to an URI.
diff --git a/src/text/unicode.c b/src/text/unicode.c
index b9b0c49..cbbe532 100644
--- a/src/text/unicode.c
+++ b/src/text/unicode.c
@@ -47,6 +47,7 @@
#elif defined (WIN32) || defined (UNDER_CE)
# define USE_MB2MB 1
+# include <io.h>
static char *locale_dup (const char *string, bool from)
{
More information about the vlc-commits
mailing list