# include <winsock.h>
#elif defined( WIN32 )
# include <winsock2.h>
+# include <ws2tcpip.h>
#elif HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
}
/* 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
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
- vlc_value_t val;
- int i_rate;
/* Problem with this way: the "rate" variable is update after the input thread do the change */
if( !strcmp( psz_cmd, "rate-slower" ) )
char * psz_modules;
char * psz_parser;
char * psz_control;
- char * psz_language;
vlc_bool_t b_exit = VLC_FALSE;
vlc_t * p_vlc = vlc_current_object( i_object );
module_t *p_help_module;
playlist_t *p_playlist;
vlc_value_t val;
+#ifndef WIN32
+ char * psz_language;
+#endif
if( !p_vlc )
{
char *psz_text, *psz_spaces = psz_spaces_text;
char *psz_bra = NULL, *psz_type = NULL, *psz_ket = NULL;
char *psz_suf = "", *psz_prefix = NULL;
- int i;
+ size_t i;
/* Skip deprecated options */
if( p_item->psz_current )
while( *psz_text )
{
char *psz_parser, *psz_word;
- int i_end = strlen( psz_text );
+ size_t i_end = strlen( psz_text );
/* If the remaining text fits in a line, print it. */
- if( i_end <= i_width )
+ if( i_end <= (size_t)i_width )
{
fprintf( stdout, "%s\n", psz_text );
break;
{
char psz_servbuf[6], *psz_serv;
int i_servlen, i_val;
+#ifdef WIN32
+ /*
+ * Here is the kind of kludge you need to keep binary compatibility among
+ * varying OS versions...
+ */
+ typedef int (CALLBACK * GETNAMEINFO) ( const struct sockaddr*, socklen_t,
+ char*, DWORD, char*, DWORD, int );
+ HINSTANCE wship6_module;
+ GETNAMEINFO ws2_getnameinfo;
+#endif
flags |= NI_NUMERICSERV;
if( portnum != NULL )
psz_serv = NULL;
i_servlen = 0;
}
-#ifdef WIN32
- /*
- * Here is the kind of kludge you need to keep binary compatibility among
- * varying OS versions...
- */
- typedef int (CALLBACK * GETNAMEINFO) ( const struct sockaddr*, socklen_t,
- char*, DWORD, char*, DWORD, int );
- HINSTANCE wship6_module;
- GETNAMEINFO ws2_getnameinfo;
-
+#ifdef WIN32
wship6_module = LoadLibrary( "wship6.dll" );
if( wship6_module != NULL )
{
* gethostbyaddr and the likes */
vlc_mutex_lock( lock.p_address );
#else
-# warning FIXME : This is not thread-safe!
+//# warning FIXME : This is not thread-safe!
#endif
i_val = __getnameinfo( sa, salen, host, hostlen, psz_serv, i_servlen,
flags );
# if defined(UNDER_CE) && defined(sockaddr_storage)
# undef sockaddr_storage
# endif
+# include <io.h>
# include <winsock2.h>
# include <ws2tcpip.h>
#else
if( i_family == AF_INET6 )
{
i_val = PROTECTION_LEVEL_UNRESTRICTED;
- setsockopt( fd, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, &i_val,
- sizeof( i_val ) );
+ setsockopt( fd, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL,
+ (const char*)&i_val, sizeof( i_val ) );
}
# else
# warning You are using outdated headers for Winsock !
static int ACL_Resolve( vlc_object_t *p_this, uint8_t *p_bytes,
const char *psz_ip )
{
- struct addrinfo hints = { }, *res;
+ struct addrinfo hints, *res;
int i_family;
hints.ai_socktype = SOCK_STREAM; /* doesn't matter */
p_method->psz_address = strdup( psz_addr );
}
else
- b_ipv6 == (strchr( p_method->psz_address, ':' ) != NULL);
+ b_ipv6 = (strchr( p_method->psz_address, ':' ) != NULL);
msg_Dbg( p_sap, "using SAP address: %s", p_method->psz_address);