Prefer NAME_MAX over MAXNAMLEN and avoid statvfs on DragonFly.

This commit is contained in:
joerg 2006-06-12 15:24:08 +00:00
parent 95fc1f5ddb
commit 74a810f560
4 changed files with 82 additions and 5 deletions

View file

@ -1,9 +1,9 @@
$NetBSD: distinfo,v 1.5 2006/02/19 16:30:31 wiz Exp $
$NetBSD: distinfo,v 1.6 2006/06/12 15:24:08 joerg Exp $
SHA1 (netatalk-1.6.4a.tar.gz) = c3dec6d29524e316967bfdc7cab35cd95e53ec90
RMD160 (netatalk-1.6.4a.tar.gz) = b34429f5ad0b83a72e343420aabfe8d8c1fe1ecc
Size (netatalk-1.6.4a.tar.gz) = 1026531 bytes
SHA1 (patch-aa) = d0d3c647d5956a570a70a755c0b69d7cd2a00694
SHA1 (patch-aa) = 9259356b2d8f3166eab38ebef8391293ab3abc1c
SHA1 (patch-ab) = e05e4c59d4be48be53a2597e38c6ab638587a831
SHA1 (patch-ac) = 81feb8c1fae68a661afd23a06825334bc6544677
SHA1 (patch-ad) = 311d00d165688d4baa1365ba6c4147bd6293f3d8
@ -12,3 +12,5 @@ SHA1 (patch-af) = 386f493052a0325063b7ffe15879c09438eef8c4
SHA1 (patch-ag) = 063b11af899f35b7030ad7c838866b68050c3b70
SHA1 (patch-ah) = a36b7b32039b9fde4bcf395ce223c2bee2bd7b84
SHA1 (patch-ai) = d2b3222ef460f07f0e19701f9892c7bb65ae1e7e
SHA1 (patch-aj) = 53b75cb1aa363d8997f4ca9de45eb5b66d8f1c87
SHA1 (patch-ak) = f1dbeb119cf648aff96b6e32ebd2d258367224ff

View file

@ -1,6 +1,6 @@
$NetBSD: patch-aa,v 1.2 2005/06/05 23:40:56 taca Exp $
$NetBSD: patch-aa,v 1.3 2006/06/12 15:24:08 joerg Exp $
--- configure.orig 2003-12-03 05:16:21.000000000 +0900
--- configure.orig 2003-12-02 20:16:21.000000000 +0000
+++ configure
@@ -19582,73 +19582,6 @@ _ACEOF
fi
@ -102,7 +102,24 @@ $NetBSD: patch-aa,v 1.2 2005/06/05 23:40:56 taca Exp $
BDB_BIN=$bdbbindir
BDB_PATH="`echo $bdbdir | sed 's,include/db3$,,'`"
BDB_PATH="`echo $BDB_PATH | sed 's,include$,,'`"
@@ -26702,7 +26635,71 @@ echo "${ECHO_T}no" >&6
@@ -25888,6 +25821,7 @@ CFLAGS="-I\$(top_srcdir)/include $CFLAGS
case "$host_os" in
*aix*) this_os=aix ;;
*freebsd*) this_os=freebsd ;;
+ *dragonfly*) this_os=dragonfly ;;
*hpux11*) this_os=hpux11 ;;
*irix*) this_os=irix ;;
*linux*) this_os=linux ;;
@@ -25921,7 +25855,7 @@ _ACEOF
fi
-if test x"$this_os" = "xfreebsd"; then
+if test x"$this_os" = "xfreebsd" || test x"$this_os" = "xdragonfly"; then
echo "$as_me:$LINENO: result: * FreeBSD specific configuration" >&5
echo "${ECHO_T} * FreeBSD specific configuration" >&6
cat >>confdefs.h <<\_ACEOF
@@ -26702,7 +26636,71 @@ echo "${ECHO_T}no" >&6
fi
@ -174,3 +191,12 @@ $NetBSD: patch-aa,v 1.2 2005/06/05 23:40:56 taca Exp $
# Check whether --enable-pgp-uam or --disable-pgp-uam was given.
@@ -27492,6 +27490,8 @@ do
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ # Avoid regenerating for rechecks on pkgsrc
+ exit 0
ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;

View file

@ -0,0 +1,36 @@
$NetBSD: patch-aj,v 1.1 2006/06/12 15:24:08 joerg Exp $
--- bin/psorder/psorder.c.orig 2001-06-29 14:14:46.000000000 +0000
+++ bin/psorder/psorder.c
@@ -35,6 +35,7 @@
#include <sys/uio.h>
#include <sys/file.h>
#include <ctype.h>
+#include <limits.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif /* HAVE_FCNTL_H */
@@ -102,7 +103,11 @@ psorder( path )
{
int tempfd;
int inputfd;
+#if defined(NAME_MAX)
+ char tempfile[NAME_MAX];
+#else
char tempfile[MAXNAMLEN];
+#endif
filesetup( path, &inputfd, tempfile, &tempfd );
readps( inputfd, tempfd, tempfile );
@@ -151,7 +156,11 @@ filesetup( inputfile, infd, tfile, tfd )
make temporary file
*/
+#if defined(NAME_MAX)
+ (void *)strncpy( tfile, template, NAME_MAX );
+#else
(void *)strncpy( tfile, template, MAXNAMLEN );
+#endif
if (( *tfd = mkstemp( tfile )) == -1 ) {
fprintf( stderr, "can't create temporary file %s\n", tfile );
filecleanup( -1, -1, "" );

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ak,v 1.1 2006/06/12 15:24:08 joerg Exp $
--- etc/afpd/unix.h.orig 2006-06-12 14:53:46.000000000 +0000
+++ etc/afpd/unix.h
@@ -30,7 +30,7 @@ typedef int mode_t;
#if defined(TRU64)
#define f_frsize f_fsize
#else /* TRU64 */
-#if defined(HAVE_SYS_STATVFS_H) || defined(__svr4__)
+#if (defined(HAVE_SYS_STATVFS_H) && !defined(__DragonFly__)) || defined(__svr4__)
#include <sys/statvfs.h>
#define statfs statvfs
#else /* HAVE_SYS_STATVFS || __svr4__ */