]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
Better ACL API (full rewrite)
[vlc] / include / vlc_common.h
index 5ccecc11ca44d6b57c354ea1a6942ef33b5fe78d..8d2ac57f87d3246059562669d7977e313d46fa12 100644 (file)
@@ -362,6 +362,7 @@ 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;
@@ -912,12 +913,21 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 
 /* Format type specifiers for 64 bits numbers */
 #if defined(__CYGWIN32__) || (!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(__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"
@@ -929,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
@@ -998,7 +1013,7 @@ typedef __int64 off_t;
 #   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_reduce, ( 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) */