+2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
+ * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
+ and inttostr.h. Use snprintf rather than uinttostr, so that
+ LGPLed code doesn't depend on GPLed.
+
2006-11-17 Paul Eggert <eggert@cs.ucla.edu>
* modules/inline (License): Change from GPL to LGPL.
#define N_(String) String
#include "inet_ntop.h"
-#include "intprops.h"
-#include "inttostr.h"
+#include "snprintf.h"
#include "strdup.h"
/* BeOS has AF_INET, but not PF_INET. */
{
unsigned short int port
= ntohs (((const struct sockaddr_in *) sa)->sin_port);
- char buf[INT_BUFSIZE_BOUND (port)];
- char const *s = uinttostr (port, buf);
- if (strlen (s) + 1 > servicelen)
+ if (servicelen <= snprintf (service, servicelen, "%u", port))
return EAI_OVERFLOW;
- memcpy (service, s, strlen (s) + 1);
}
break;
}