* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include <stddef.h> /* size_t */
getnameinfo (const struct sockaddr *sa, socklen_t salen,
char *host, DWORD hostlen, char *serv, DWORD servlen, int flags)
#else
-static int
+static int
getnameinfo (const struct sockaddr *sa, socklen_t salen,
char *host, int hostlen, char *serv, int servlen, int flags)
#endif
getaddrinfo (const char *node, const char *service,
const struct addrinfo *hints, struct addrinfo **res)
#else
-static int
+static int
getaddrinfo (const char *node, const char *service,
const struct addrinfo *hints, struct addrinfo **res)
#endif
port = 0;
else
{
- long d;
+ unsigned long d;
char *end;
d = strtoul (service, &end, 0);
if (entry == NULL)
{
/* not found, use replacement API instead */
- entry = getnameinfo;
+ entry = getnameinfo;
}
/* call API before replacing function pointer to avoid crash */
if ((entry == NULL) || (freentry == NULL))
{
/* not found, use replacement API instead */
- entry = getaddrinfo;
- freentry = freeaddrinfo;
+ entry = getaddrinfo;
+ freentry = freeaddrinfo;
}
/* call API before replacing function pointer to avoid crash */
result = entry (node, service, hints, res);
#if defined (HAVE_GETADDRINFO)
# ifdef AI_IDN
/* Run-time I18n Domain Names support */
- static vlc_bool_t b_idn = VLC_TRUE; /* beware of thread-safety */
+ static bool b_idn = true; /* beware of thread-safety */
if (b_idn)
{
/* IDN not available: disable and retry without it */
hints.ai_flags &= ~AI_IDN;
- b_idn = VLC_FALSE;
+ b_idn = false;
msg_Info (p_this, "International Domain Names not supported");
}
# endif