summaryrefslogtreecommitdiff
path: root/textproc/groff
diff options
context:
space:
mode:
authorjschauma <jschauma>2004-05-08 03:21:57 +0000
committerjschauma <jschauma>2004-05-08 03:21:57 +0000
commit5373109c2e02d7bef8cdb06074b2f77a682c474a (patch)
tree2bf22929e969b34dfab5220112b11d5a4afdf591 /textproc/groff
parentbabd2f6d4c4db738de37476e6132f784c7211e96 (diff)
downloadpkgsrc-5373109c2e02d7bef8cdb06074b2f77a682c474a.tar.gz
Under Irix, vsnprintf(3) happily truncates longer strings and returns
the number of size. This lead to some of the commands being truncated and not executing appropriately. (The function in questions was make_message in ./src/preproc/html/pre-html.cpp.) Patch this to also behave correctly with Irix' vsnprintf(3) family. This should address PR pkg/22563.
Diffstat (limited to 'textproc/groff')
-rw-r--r--textproc/groff/distinfo3
-rw-r--r--textproc/groff/patches/patch-af22
2 files changed, 24 insertions, 1 deletions
diff --git a/textproc/groff/distinfo b/textproc/groff/distinfo
index 4053a5861da..f602beb819d 100644
--- a/textproc/groff/distinfo
+++ b/textproc/groff/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2003/07/01 10:12:54 wiz Exp $
+$NetBSD: distinfo,v 1.6 2004/05/08 03:21:57 jschauma Exp $
SHA1 (groff-1.19.tar.gz) = b045c1e9f4aafec5e52c32e04eac537952f617ca
Size (groff-1.19.tar.gz) = 2416140 bytes
@@ -7,3 +7,4 @@ SHA1 (patch-ab) = 96e82cde53a6f945763e88f0b163581a71dc448b
SHA1 (patch-ac) = 0bf974a050a762172cb3b43edd55159fe22c955d
SHA1 (patch-ad) = 1ccb3038b60c9f3955c03dcdc5913c1541e41a87
SHA1 (patch-ae) = 18d553fe99ca6915d42de5f6edf74fc56e2fc650
+SHA1 (patch-af) = 9b880e36e30c1206ff09f63f227c8621922310f9
diff --git a/textproc/groff/patches/patch-af b/textproc/groff/patches/patch-af
new file mode 100644
index 00000000000..94acfca62fd
--- /dev/null
+++ b/textproc/groff/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.1 2004/05/08 03:21:57 jschauma Exp $
+
+--- ./src/preproc/html/pre-html.cpp.orig Fri May 7 17:51:50 2004
++++ ./src/preproc/html/pre-html.cpp Fri May 7 17:52:08 2004
+@@ -263,7 +263,7 @@
+ n = vsnprintf (p, size, fmt, ap);
+ va_end(ap);
+ /* If that worked, return the string. */
+- if (n > -1 && n < size) {
++ if (n > -1 && n < size-1) {
+ if (size > n+1) {
+ np = strsave(p);
+ free(p);
+@@ -272,8 +272,6 @@
+ return p;
+ }
+ /* Else try again with more space. */
+- if (n > -1) /* glibc 2.1 */
+- size = n+1; /* precisely what is needed */
+ else /* glibc 2.0 */
+ size *= 2; /* twice the old size */
+ if ((np = (char *)realloc (p, size)) == NULL) {