summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fseek.c
diff options
context:
space:
mode:
authordt <dt@FreeBSD.org>1999-02-08 21:32:38 +0000
committerdt <dt@FreeBSD.org>1999-02-08 21:32:38 +0000
commitdd5f24e20cdd683adbb5885bb01814ac81fbc90b (patch)
tree2f7f0b89a7c12e8dce152773c267d5fe10f78eb6 /lib/libc/stdio/fseek.c
parentaf242fbed135e989cc0ff0985a4ebdad783ef2eb (diff)
downloadFreeBSD-src-dd5f24e20cdd683adbb5885bb01814ac81fbc90b.zip
FreeBSD-src-dd5f24e20cdd683adbb5885bb01814ac81fbc90b.tar.gz
Added functions fseeko() and ftello() (from susv2).
Fixed fgetpos() and fsetpos() for offsets > 2GB. PR: 8637 Submitted by: Dan Nelson <dnelson@emsphone.com> (adjusted by me a little)
Diffstat (limited to 'lib/libc/stdio/fseek.c')
-rw-r--r--lib/libc/stdio/fseek.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index 808d3ae..7d7254a 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)fseek.c 8.3 (Berkeley) 1/2/94";
#endif
static const char rcsid[] =
- "$Id: fseek.c,v 1.6 1997/02/22 15:02:05 peter Exp $";
+ "$Id: fseek.c,v 1.7 1998/04/11 07:40:44 jb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -53,14 +53,23 @@ static const char rcsid[] =
#define POS_ERR (-(fpos_t)1)
+int
+fseek(fp, offset, whence)
+ register FILE *fp;
+ long offset;
+ int whence;
+{
+ return (fseeko(fp, offset, whence));
+}
+
/*
* Seek the given file to the given offset.
* `Whence' must be one of the three SEEK_* macros.
*/
int
-fseek(fp, offset, whence)
+fseeko(fp, offset, whence)
register FILE *fp;
- long offset;
+ off_t offset;
int whence;
{
register fpos_t (*seekfn) __P((void *, fpos_t, int));
OpenPOWER on IntegriCloud