summaryrefslogtreecommitdiff
path: root/archivers/afio/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2005-10-03 11:15:55 +0000
committerjoerg <joerg>2005-10-03 11:15:55 +0000
commitb90f8191cf95da0c891b1de76c7b4731496ef976 (patch)
treeb7f5502bb4c6097eeb150f91895d1c40046baf37 /archivers/afio/patches
parentc0faba6e4380342416cebebd7b728dd924254aa5 (diff)
downloadpkgsrc-b90f8191cf95da0c891b1de76c7b4731496ef976.tar.gz
Use NAME_MAX (POSIX) by default and only fallback to the BSD or SysV
constants, when it doesn't exist. The latter isn't defined on DragonFly by default anymore, since it is inherently filesystem specific.
Diffstat (limited to 'archivers/afio/patches')
-rw-r--r--archivers/afio/patches/patch-ab27
1 files changed, 23 insertions, 4 deletions
diff --git a/archivers/afio/patches/patch-ab b/archivers/afio/patches/patch-ab
index 6c889ef37ac..957e49b7624 100644
--- a/archivers/afio/patches/patch-ab
+++ b/archivers/afio/patches/patch-ab
@@ -1,8 +1,16 @@
-$NetBSD: patch-ab,v 1.1 2004/07/10 15:35:52 salo Exp $
+$NetBSD: patch-ab,v 1.2 2005/10/03 11:15:55 joerg Exp $
---- compfile.c.orig Tue Jun 24 23:32:20 2003
-+++ compfile.c Sat Jul 10 17:26:02 2004
-@@ -210,7 +210,7 @@
+--- compfile.c.orig 2003-06-24 21:32:20.000000000 +0000
++++ compfile.c
+@@ -2,6 +2,7 @@
+
+ #include <stdio.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <unistd.h>
+ #include <string.h>
+
+@@ -210,7 +211,7 @@ void waitforgzip()
* version;
*/
@@ -11,3 +19,14 @@ $NetBSD: patch-ab,v 1.1 2004/07/10 15:35:52 salo Exp $
#include <dirent.h>
#else
#include <sys/dir.h>
+@@ -283,7 +284,9 @@ compressfile (int *fdp, char *name, reg
+ tmpcomp++;
+ else
+ tmpcomp = name;
+-#ifdef MAXNAMLEN /* BSD otherwise should be sysV (FFS on sysV?) */
++#if defined(NAME_MAX)
++ if (strlen (tmpcomp) + 2 > NAME_MAX)
++#elif defined(MAXNAMLEN) /* BSD otherwise should be sysV (FFS on sysV?) */
+ if (strlen (tmpcomp) + 2 > MAXNAMLEN)
+ #else
+ if (strlen (tmpcomp) + 2 > DIRSIZ)