]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
A bit of headers cleanup
[vlc] / include / vlc_common.h
index 9a22246699ffe20babf4cea855abc1ea46d8014c..075d16bb43f44b6ceaeab4d0e6329b0ea523452a 100644 (file)
@@ -24,7 +24,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-
 /**
  * \file
  * This file is a collection of common definitions and types
@@ -471,7 +470,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
  * Plug-in stuff
  *****************************************************************************/
 
-#include "modules_inner.h"
+#include "vlc_modules_macros.h"
 
 #if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC)
 #   ifdef __cplusplus
@@ -649,6 +648,8 @@ static int64_t GCD( int64_t a, int64_t b )
 
 #define EMPTY_STR(str) (!str || !*str)
 
+VLC_EXPORT( char const *, vlc_error, ( int ) );
+
 #include <vlc_arrays.h>
 
 /* MSB (big endian)/LSB (little endian) conversions - network order is always
@@ -871,7 +872,7 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #endif
 
 #if defined(SYS_BEOS) \
- || (defined (__FreeBSD__) && (__FreeBSD_version__ < 500000))
+ || (defined (__FreeBSD__) && (__FreeBSD__ < 5))
     typedef struct {
         long long quot; /* Quotient. */
         long long rem;  /* Remainder. */
@@ -969,9 +970,20 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #   endif
 #endif
 
-    VLC_EXPORT( void *, vlc_opendir_wrapper, ( const char * ) );
-    VLC_EXPORT( struct dirent *, vlc_readdir_wrapper, ( void * ) );
-    VLC_EXPORT( int, vlc_closedir_wrapper, ( void * ) );
+#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 * ) );
+#   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
+#else
+#   define vlc_wclosedir NULL
+#endif
 
 /* Format type specifiers for 64 bits numbers */
 #if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE))
@@ -1149,20 +1161,23 @@ VLC_EXPORT( const char *, VLC_Error, ( int ) );
  * Additional vlc stuff
  *****************************************************************************/
 #ifndef HAVE_SHARED_LIBVLC
+#   ifdef HAVE_DIRENT_H
+#   include <dirent.h>  /* for DIR typedef in vlc_symbols.h */
+#   endif
 VLC_EXPORT( const char *, VLC_Changeset, ( void ) );
 #   include "vlc_symbols.h"
 #else
 #   define VLC_Changeset( ) ("exported")
 #endif
-#include "os_specific.h"
+#include "vlc_os_specific.h"
 #include "vlc_messages.h"
-#include "variables.h"
+#include "vlc_variables.h"
 #include "vlc_objects.h"
 #include "vlc_threads_funcs.h"
-#include "mtime.h"
-#include "modules.h"
+#include "vlc_mtime.h"
+#include "vlc_modules.h"
 #include "main.h"
-#include "configuration.h"
+#include "vlc_configuration.h"
 
 #if defined( __BORLANDC__ )
 #   undef PACKAGE