[vlc-devel] commit: libvlccore: Add vlc_wclosedir to the exported symbols. (Pierre d' Herbemont )

git version control git at videolan.org
Wed May 28 01:25:01 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed May 28 01:20:20 2008 +0200| [1e50cd4c4da6441c8c390f0ba1ae39c5cb387d2a]

libvlccore: Add vlc_wclosedir to the exported symbols.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e50cd4c4da6441c8c390f0ba1ae39c5cb387d2a
---

 include/vlc_common.h |    3 +++
 src/extras/libc.c    |   23 ++++++++++++++---------
 src/libvlc.h         |    2 +-
 src/libvlccore.sym   |    1 +
 4 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index bd56d97..c629db6 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -774,6 +774,9 @@ 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 ) );
 #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 ));
+
 /*****************************************************************************
  * CPU capabilities
  *****************************************************************************/
diff --git a/src/extras/libc.c b/src/extras/libc.c
index a887c2d..4f62486 100644
--- a/src/extras/libc.c
+++ b/src/extras/libc.c
@@ -296,26 +296,31 @@ struct _wdirent *vlc_wreaddir( void *_p_dir )
     return &p_dir->dd_dir;
 }
 
-int vlc_wclosedir( void *_p_dir )
+void vlc_rewinddir( void *_p_dir )
 {
     vlc_DIR *p_dir = (vlc_DIR *)_p_dir;
-    int i_ret = 0;
 
     if ( p_dir->p_real_dir != NULL )
-        i_ret = _wclosedir( p_dir->p_real_dir );
-
-    free( p_dir );
-    return i_ret;
+        _wrewinddir( p_dir->p_real_dir );
 }
+#endif
 
-void vlc_rewinddir( void *_p_dir )
+/* This one is in the libvlccore exported symbol list */
+int vlc_wclosedir( void *_p_dir )
 {
+#if defined(WIN32) && !defined(UNDER_CE)
     vlc_DIR *p_dir = (vlc_DIR *)_p_dir;
+    int i_ret = 0;
 
     if ( p_dir->p_real_dir != NULL )
-        _wrewinddir( p_dir->p_real_dir );
-}
+        i_ret = _wclosedir( p_dir->p_real_dir );
+
+    free( p_dir );
+    return i_ret;
+#else
+    return closedir( _p_dir );
 #endif
+}
 
 #if defined (WIN32)
 /**
diff --git a/src/libvlc.h b/src/libvlc.h
index 69713f2..ff0ce61 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -280,7 +280,7 @@ void  vlc_rewinddir(void *);
 #if defined (WIN32)
 #   include <dirent.h>
 void *vlc_wopendir (const wchar_t *);
-void *vlc_wclosedir (void *);
+/* void *vlc_wclosedir (void *); in vlc's exported symbols */
 struct _wdirent *vlc_wreaddir (void *);
 void vlc_rewinddir (void *);
 #   define _wopendir vlc_wopendir
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 0d17d86..64119e0 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -454,6 +454,7 @@ vlc_threadvar_create
 vlc_threadvar_delete
 vlc_ureduce
 VLC_Version
+vlc_wclosedir
 vlc_wraptext
 vlm_Control
 vlm_Delete




More information about the vlc-devel mailing list