about summary refs log tree commit diff
path: root/resolv/inet_ntop.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-05-24 20:16:39 +0000
committerRoland McGrath <roland@gnu.org>1996-05-24 20:16:39 +0000
commit613a76ff52a680e71db772306a260b9cb7f95b49 (patch)
tree7c6ff1e04f1cadef4b95c93e295d3df2ad0631d0 /resolv/inet_ntop.c
parent510ca033d66c47e0dc54550928dece59799a0136 (diff)
downloadglibc-613a76ff52a680e71db772306a260b9cb7f95b49.tar.gz
glibc-613a76ff52a680e71db772306a260b9cb7f95b49.tar.xz
glibc-613a76ff52a680e71db772306a260b9cb7f95b49.zip
Fri May 24 02:31:36 1996 Ulrich Drepper <drepper@cygnus.com>
	* sysdeps/unix/sysv/linux/speed.c: Add new speed value 460800.

Thu May 23 23:09:33 1996  Ulrich Drepper  <drepper@cygnus.com>

	* FAQ: Add answer for 100% source code compatibility to Linux
	libc by David Mosberger-Tang.

	Update from bind-4.3.4-T3B.
	* inet/arpa/inet.h: Add prototypes for inet_pton, inet_ntop,
	inet_nsap_addr, and inet_nsap_ntoa.
	* resolv/gethnamaddr.c: Correct compatibility problems (sprintf),
	remove fourth argument to inet_pton and correct handling of
	host_addr passing.
	* resolv/inet_ntop.c: Correct compatibility problems (sprintf).
	* resolv/inet_pton.c: Remove fourth argument.
	* resolv/resolv.h: Remove prototypes for inet_nsap_addr and
	inet_nsap_ntoa.  Now on <arpa/inet.h>.

	* stdlib/gmp-impl.h: Add prototypes for internal functions.

Thu May 23 22:49:15 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

	* Rules (subdir_install): Remove dep on sor-$(subdir).
	(static-only-routines): Removed variable and associated rules.

	* sysdeps/unix/sysv/linux/alpha/Makefile (headers): Add
 	sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S,
 	sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
 	sysdeps/unix/sysv/linux/alpha/start.S,
Diffstat (limited to 'resolv/inet_ntop.c')
-rw-r--r--resolv/inet_ntop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/resolv/inet_ntop.c b/resolv/inet_ntop.c
index 71db06d845..3b5795f349 100644
--- a/resolv/inet_ntop.c
+++ b/resolv/inet_ntop.c
@@ -29,6 +29,12 @@ static char rcsid[] = "$Id$";
 #include <stdio.h>
 #include "../conf/portability.h"
 
+#ifdef SPRINTF_CHAR
+# define SPRINTF(x) strlen(sprintf/**/x)
+#else
+# define SPRINTF(x) sprintf x
+#endif
+
 /*
  * WARNING: Don't even consider trying to compile this on a system where
  * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
@@ -84,7 +90,7 @@ inet_ntop4(src, dst, size)
 	static const char fmt[] = "%u.%u.%u.%u";
 	char tmp[sizeof "255.255.255.255"];
 
-	if (sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) > size) {
+	if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
 		errno = ENOSPC;
 		return (NULL);
 	}
@@ -170,7 +176,7 @@ inet_ntop6(src, dst, size)
 			tp += strlen(tp);
 			break;
 		}
-		tp += sprintf(tp, "%x", words[i]);
+		tp += SPRINTF((tp, "%x", words[i]));
 	}
 	/* Was it a trailing run of 0x00's? */
 	if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))