head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.10 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.8 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.6 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.4 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.2 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.1.0.26 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.24 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.22 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.20 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.18 pkgsrc-2008Q1:1.1.0.16 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.14 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.12 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.10 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.8 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.6 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.4 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.2 pkgsrc-2006Q2-base:1.1; locks; strict; comment @# @; 1.2 date 2009.02.22.07.36.35; author taca; state dead; branches; next 1.1; 1.1 date 2006.06.12.15.24.08; author joerg; state Exp; branches; next ; desc @@ 1.2 log @Retire old net/netatalk1. Please use net/netatalk instead. @ text @$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 #include #include +#include #ifdef HAVE_FCNTL_H #include #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, "" ); @ 1.1 log @Prefer NAME_MAX over MAXNAMLEN and avoid statvfs on DragonFly. @ text @d1 1 a1 1 $NetBSD$ @