Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/sort max_o in struct tempfile needs to be off_t
details: https://anonhg.NetBSD.org/src/rev/5ac03248d085
branches: trunk
changeset: 540796:5ac03248d085
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Dec 24 15:09:27 2002 +0000
description:
max_o in struct tempfile needs to be off_t
use fseeko() rather than fseek() when changing file offset using max_o
diffstat:
usr.bin/sort/files.c | 6 +++---
usr.bin/sort/fsort.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 9d28f3b246dc -r 5ac03248d085 usr.bin/sort/files.c
--- a/usr.bin/sort/files.c Tue Dec 24 15:02:46 2002 +0000
+++ b/usr.bin/sort/files.c Tue Dec 24 15:09:27 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: files.c,v 1.17 2001/05/15 11:18:23 jdolecek Exp $ */
+/* $NetBSD: files.c,v 1.18 2002/12/24 15:09:27 jdolecek Exp $ */
/*-
* Copyright (c) 1993
@@ -40,7 +40,7 @@
#include "fsort.h"
#ifndef lint
-__RCSID("$NetBSD: files.c,v 1.17 2001/05/15 11:18:23 jdolecek Exp $");
+__RCSID("$NetBSD: files.c,v 1.18 2002/12/24 15:09:27 jdolecek Exp $");
__SCCSID("@(#)files.c 8.1 (Berkeley) 6/6/93");
#endif /* not lint */
@@ -91,7 +91,7 @@
+= sizeof(nleft) + nleft;
else if (binno == maxb) {
if (binno != fstack[infl0].lastb) {
- fseek(fp, fstack[infl0+
+ fseeko(fp, fstack[infl0+
cnt].max_o, SEEK_SET);
fread(&nleft, sizeof(nleft), 1, fp);
}
diff -r 9d28f3b246dc -r 5ac03248d085 usr.bin/sort/fsort.h
--- a/usr.bin/sort/fsort.h Tue Dec 24 15:02:46 2002 +0000
+++ b/usr.bin/sort/fsort.h Tue Dec 24 15:09:27 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsort.h,v 1.9 2001/05/14 21:45:20 jdolecek Exp $ */
+/* $NetBSD: fsort.h,v 1.10 2002/12/24 15:09:27 jdolecek Exp $ */
/*-
* Copyright (c) 1993
@@ -72,6 +72,6 @@
FILE *fp;
u_char maxb;
u_char lastb;
- int max_o;
+ off_t max_o;
};
extern struct tempfile fstack[MAXFCT];
Home |
Main Index |
Thread Index |
Old Index