X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_common.h;h=e42488805705e35813dc53a9c0135805c75e91f0;hb=4f5b5ee95cec30c3bfe13e5b28790a9008dbcf03;hp=3b694b597fffef4d7e5ff6f20f228f2661e31292;hpb=95db5344b35ef0d45271614b3dbd0f5a972b68f0;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index 3b694b597f..e424888057 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -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 /* 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. */ @@ -957,9 +958,15 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) # 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 * ) ); #else struct dirent; /* forward declaration for vlc_symbols.h */ # if !defined(__PLUGIN__) @@ -969,9 +976,23 @@ 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 +VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) ); +VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) ); +VLC_INTERNAL( 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 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)) @@ -1149,20 +1170,31 @@ VLC_EXPORT( const char *, VLC_Error, ( int ) ); * Additional vlc stuff *****************************************************************************/ #ifndef HAVE_SHARED_LIBVLC +# ifdef HAVE_DIRENT_H +# include /* 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" + +/** The global thread var for msg stack context + * We store this as a static global variable so we don't need a vlc_object_t + * everywhere. + * This key is created in vlc_threads_init and is therefore ready to use at + * the very beginning of the universe */ +extern vlc_threadvar_t msg_context_global_key; + #if defined( __BORLANDC__ ) # undef PACKAGE