* 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 <sam@via.ecp.fr>
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;
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;
}
/* 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
#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"
/* 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
# include <tchar.h>
#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) */