# include <netdb.h>
#endif
+# ifdef __cplusplus
+extern "C" {
+# endif
/*****************************************************************************
* network_socket_t: structure passed to a network plug-in to define the
* (even if they are not URL-safe), nor URL-safe characters.
* We still encode some of them because of Microsoft's crap browser.
*/
- || ( strchr( "/:.[]-_.", c ) != NULL );
+ || ( strchr( "-_.", c ) != NULL );
}
/*****************************************************************************
VLC_EXPORT( int, __net_Select, ( vlc_object_t *p_this, int *pi_fd, v_socket_t **, int i_fd, uint8_t *p_data, int i_data, mtime_t i_wait ) );
#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
-VLC_EXPORT( int, __net_Write, ( vlc_object_t *p_this, int fd, v_socket_t *, uint8_t *p_data, int i_data ) );
+VLC_EXPORT( int, __net_Write, ( vlc_object_t *p_this, int fd, v_socket_t *, const uint8_t *p_data, int i_data ) );
#define net_Gets(a,b,c) __net_Gets(VLC_OBJECT(a),b,c)
VLC_EXPORT( char *, __net_Gets, ( vlc_object_t *p_this, int fd, v_socket_t * ) );
# define net_StopSend( fd ) (void)shutdown( fd, SD_SEND )
# define net_StopRecv( fd ) (void)shutdown( fd, SD_RECEIVE )
#else
-# warning FIXME: implement shutdown on your platform!
+# ifndef SYS_BEOS /* R5 just doesn't have a working shutdown() */
+# warning FIXME: implement shutdown on your platform!
+# endif
# define net_StopSend( fd ) (void)0
# define net_StopRecv( fd ) (void)0
#endif
&& ( ntohl( v4->sin_addr.s_addr ) <= 0xefffffff );
#endif
}
+#if defined( WIN32 ) || defined( HAVE_GETADDRINFO )
else if( res->ai_family == AF_INET6 )
{
-#if defined( WIN32 ) || defined( HAVE_GETADDRINFO )
struct sockaddr_in6 *v6 = (struct sockaddr_in6 *)res->ai_addr;
b_multicast = IN6_IS_ADDR_MULTICAST( &v6->sin6_addr );
-#endif
}
+#endif
vlc_freeaddrinfo( res );
return b_multicast;
? VLC_EGENERIC : 0;
}
+# ifdef __cplusplus
+}
+# endif
+
#endif