X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_common.h;h=158122b282d98c316d5351f9a80dcd5a67bbb28b;hb=4d6d9949cc44e1e87904dc897c6df0cda3badd26;hp=0c0bcfd634816c1e36844d77e64919d3282f251e;hpb=d41216c0fda8ec3a60bb07463c1b1d868bac73c3;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index 0c0bcfd634..158122b282 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -2,7 +2,7 @@ * common.h: common definitions * Collection of useful common types and macros definitions ***************************************************************************** - * Copyright (C) 1998-2004 VideoLAN + * Copyright (C) 1998-2005 the VideoLAN team * $Id$ * * Authors: Samuel Hocevar @@ -360,6 +360,9 @@ typedef struct pes_packet_t pes_packet_t; typedef struct network_socket_t network_socket_t; typedef struct virtual_socket_t v_socket_t; typedef struct iso639_lang_t iso639_lang_t; +typedef struct sockaddr sockaddr; +typedef struct addrinfo addrinfo; +typedef struct vlc_acl_t vlc_acl_t; /* block */ typedef struct block_t block_t; @@ -384,6 +387,9 @@ typedef struct tls_t tls_t; typedef struct tls_server_t tls_server_t; typedef struct tls_session_t tls_session_t; +/* Hashing */ +typedef struct md5_s md5_t; + /* XML */ typedef struct xml_t xml_t; typedef struct xml_sys_t xml_sys_t; @@ -530,7 +536,7 @@ static int64_t GCD( int64_t a, int64_t b ) } /* Dynamic array handling: realloc array, move data, increment position */ -#if defined( _MSC_VER ) +#if defined( _MSC_VER ) && _MSC_VER < 1300 # define VLCCVP (void**) /* Work-around for broken compiler */ #else # define VLCCVP @@ -906,13 +912,22 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) #endif /* Format type specifiers for 64 bits numbers */ -#if !defined(WIN32) && !defined(UNDER_CE) -# define I64Fd "%lld" -# define I64Fi "%lli" -# define I64Fo "%llo" -# define I64Fu "%llu" -# define I64Fx "%llx" -# define I64FX "%llX" +#if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE)) +# if defined(__WORDSIZE) && __WORDSIZE == 64 +# define I64Fd "%ld" +# define I64Fi "%li" +# define I64Fo "%lo" +# define I64Fu "%lu" +# define I64Fx "%lx" +# define I64FX "%lX" +# else +# define I64Fd "%lld" +# define I64Fi "%lli" +# define I64Fo "%llo" +# define I64Fu "%llu" +# define I64Fx "%llx" +# define I64FX "%llX" +# endif #else # define I64Fd "%I64d" # define I64Fi "%I64i" @@ -924,8 +939,13 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) /* 64 bits integer constant suffix */ #if defined( __MINGW32__ ) || (!defined(WIN32) && !defined(UNDER_CE)) -# define I64C(x) x##LL -# define UI64C(x) x##ULL +# if defined(__WORDSIZE) && __WORDSIZE == 64 +# define I64C(x) x##L +# define UI64C(x) x##UL +# else +# define I64C(x) x##LL +# define UI64C(x) x##ULL +# endif #else # define I64C(x) x##i64 # define UI64C(x) x##ui64 @@ -993,7 +1013,7 @@ typedef __int64 off_t; # include #endif -VLC_EXPORT( vlc_bool_t, vlc_reduce, ( int *, int *, int64_t, int64_t, int64_t ) ); +VLC_EXPORT( vlc_bool_t, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) ); VLC_EXPORT( char **, vlc_parse_cmdline, ( const char *, int * ) ); /* vlc_wraptext (defined in src/extras/libc.c) */