Use PATH_MAX instead of 81 for a path name buffer.

This commit is contained in:
simonb 2003-04-26 05:18:00 +00:00
parent efc6eee531
commit 8dbfc3b20f
2 changed files with 19 additions and 8 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.4 2003/03/30 02:24:42 itohy Exp $
$NetBSD: distinfo,v 1.5 2003/04/26 05:18:00 simonb Exp $
SHA1 (unixbench-4.1.0.tgz) = 0a43d9cf08869c0f81bde4647be6bcf76c064248
Size (unixbench-4.1.0.tgz) = 63075 bytes
@ -7,4 +7,4 @@ SHA1 (patch-ab) = b018ad36a3a72b16bb29e8049a7bfe172888b5b8
SHA1 (patch-ac) = ebfb09da84c96f8c6f48293c65a74dcf8a43cff5
SHA1 (patch-ad) = 3a1b788d9fa51fc168d59d8c87b1f476df2d5f41
SHA1 (patch-ae) = fbbce3deed7f0421034c1d57b66b1967ad8bddf1
SHA1 (patch-af) = 3594f2cc39fb6ab9bd4266f294b5ec4297c0fdb7
SHA1 (patch-af) = 022a7e668dfca41e2a6f3a825f5bd17af29dc270

View file

@ -1,18 +1,29 @@
$NetBSD: patch-af,v 1.1 2003/03/30 02:24:43 itohy Exp $
$NetBSD: patch-af,v 1.2 2003/04/26 05:18:00 simonb Exp $
Fix LP64 problem.
--- src/execl.c.orig Thu Jul 29 06:46:58 1999
+++ src/execl.c Sun Mar 30 00:35:24 2003
@@ -47,6 +47,7 @@
--- src/execl.c.orig 1999-07-29 07:46:58.000000000 +1000
+++ src/execl.c 2003-04-26 15:10:39.000000000 +1000
@@ -22,6 +22,7 @@
*/
char SCCSid[] = "@(#) @(#)execl.c:3.3 -- 5/15/91 19:30:19";
+#include <limits.h>
#include <stdio.h>
#include <sys/types.h>
@@ -45,8 +46,9 @@
char *ptr;
char *fullpath;
int duration;
char count_str[6], start_str[12], path_str[81], *dur_str;
- char count_str[6], start_str[12], path_str[81], *dur_str;
+ char count_str[6], start_str[12], path_str[PATH_MAX], *dur_str;
time_t start_time, this_time;
+ unsigned long ul_time;
#ifdef DEBUG
int count;
@@ -77,12 +78,13 @@
@@ -77,12 +79,13 @@
duration = atoi(argv[2]);
dur_str = argv[2];
iter = (unsigned long)atoi(argv[3]); /* where are we now ? */