/*
- * $Id: psorder.c,v 1.8 2009-10-14 01:38:28 didg Exp $
+ * $Id: psorder.c,v 1.10 2010-04-12 14:28:47 franklahm Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
#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 */
make temporary file
*/
- strncpy( tfile, template, MAXNAMLEN );
+#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, "" );
{
off_t ccread = 0;
off_t ccmatch;
- char *curtok = 0;
+ char *curtok = NULL;
FILE *tempstream;
pa_buf_t *pb;
int n;
{
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 );