Module Name: src
Committed By: christos
Date: Sun Nov 16 20:32:52 UTC 2014
Modified Files:
src/lib/libc/stdio: fseek.c
Log Message:
Don't try to extend the offset range on 32 bit machines by treating negative
offsets as positive. It is just confusing.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/stdio/fseek.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdio/fseek.c
diff -u src/lib/libc/stdio/fseek.c:1.23 src/lib/libc/stdio/fseek.c:1.24
--- src/lib/libc/stdio/fseek.c:1.23 Tue Apr 29 02:53:01 2008
+++ src/lib/libc/stdio/fseek.c Sun Nov 16 15:32:52 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: fseek.c,v 1.23 2008/04/29 06:53:01 martin Exp $ */
+/* $NetBSD: fseek.c,v 1.24 2014/11/16 20:32:52 christos Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fseek.c,v 1.23 2008/04/29 06:53:01 martin Exp $");
+__RCSID("$NetBSD: fseek.c,v 1.24 2014/11/16 20:32:52 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -55,9 +55,12 @@ fseek(FILE *fp, long l_offset, int whenc
{
off_t offset;
+#if 0
+ /* This is a bad idea because makes fseek(fp, -6, SEEK_SET) work... */
if (whence == SEEK_SET)
offset = (unsigned long)l_offset;
else
+#endif
offset = l_offset;
return fseeko(fp, offset, whence);
}