From c76e0e56794b6c5a405bd6da476c42e72a4cfda8 Mon Sep 17 00:00:00 2001
From: Fred Drake <fdrake@acm.org>
Date: Fri, 4 Aug 2000 02:34:41 +0000
Subject: [PATCH] snprintf() is not portable, so continue to use sprintf()
 until a portable snprintf() is available.

---
 Objects/rangeobject.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index ad9824ff29..8c208e9f39 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -65,21 +65,19 @@ range_repr(rangeobject *r)
 	char buf2[80];
 
 	if (r->start == 0 && r->step == 1) {
-		snprintf(buf1, sizeof(buf1), "xrange(%ld)",
-			 r->start + r->len * r->step);
+		sprintf(buf1, "xrange(%ld)", r->start + r->len * r->step);
 	}
 	else {
 		char *fmt = "xrange(%ld, %ld, %ld)";
 		if (r->step == 1)
 			fmt = "xrange(%ld, %ld)";
-		snprintf(buf1, sizeof(buf1), fmt,
-			 r->start,
-			 r->start + r->len * r->step,
-			 r->step);
+		sprintf(buf1, fmt,
+			r->start,
+			r->start + r->len * r->step,
+			r->step);
 	}
 	if (r->reps != 1) {
-		snprintf(buf2, sizeof(buf2),
-			 "(%s * %d)", buf1, r->reps);
+		sprintf(buf2, "(%s * %d)", buf1, r->reps);
 	}
 	return PyString_FromString(r->reps == 1 ? buf1 : buf2);
 }
-- 
2.40.0