diff options
| author | christos <christos@NetBSD.org> | 2014-11-16 20:32:52 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2014-11-16 20:32:52 +0000 |
| commit | d6bc9b224f7c8d019ba3c8d2ec04b24abfbac6c9 (patch) | |
| tree | f7543ce11896560b52d4ce704991993371cc0939 /lib/libc | |
| parent | 0b4e3fde3a95bbb072683ad46971d756e10b1ada (diff) | |
Don't try to extend the offset range on 32 bit machines by treating negative
offsets as positive. It is just confusing.
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdio/fseek.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c index bcfa5a96efb..04b1149643d 100644 --- a/lib/libc/stdio/fseek.c +++ b/lib/libc/stdio/fseek.c @@ -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 whence) { 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); } |
