/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
+ * $Id$
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
#include "config.h"
#endif
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#endif
#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h> /* needed to define AF_ values on Windows */
+#include <winsock2.h> /* needed to define AF_ values on Windows */
+#if _MSC_VER < 1600 /* errno.h defines EAFNOSUPPORT in Windows VC10 (and presumably eventually in VC11 ...) */
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
const char *pch;
if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
+ size_t new = *tp * 10 + (pch - digits);
if (new > 255)
return (0);
- *tp = new;
+ *tp = (u_char) new;
if (! saw_digit) {
if (++octets > 4)
return (0);
* Since some memmove()'s erroneously fail to handle
* overlapping regions, we'll do the shift by hand.
*/
- const int n = tp - colonp;
+ const int n = (int) (tp - colonp);
int i;
if (tp == endp)