diff options
author | 2000-02-21 22:11:20 +0000 | |
---|---|---|
committer | 2000-02-21 22:11:20 +0000 | |
commit | 8b74247033dee8049b4768e6075fe0d3342fcf4e (patch) | |
tree | 2eeb686ff96c918e906923e39ba604eee570287c /lib/libc/stdio/fgetpos.c | |
parent | PKCS#1 padding (diff) | |
download | wireguard-openbsd-8b74247033dee8049b4768e6075fe0d3342fcf4e.tar.xz wireguard-openbsd-8b74247033dee8049b4768e6075fe0d3342fcf4e.zip |
Add fseeko() and ftello() -- versions of fseek() and ftell() that use off_t.
Also make fsetpos() and fgetpos() use fseeko() and ftello() respectively
since fpos_t is actually a 64bit type.
Diffstat (limited to 'lib/libc/stdio/fgetpos.c')
-rw-r--r-- | lib/libc/stdio/fgetpos.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/stdio/fgetpos.c b/lib/libc/stdio/fgetpos.c index 83edbcbcf1e..4ea497c7cf2 100644 --- a/lib/libc/stdio/fgetpos.c +++ b/lib/libc/stdio/fgetpos.c @@ -35,15 +35,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: fgetpos.c,v 1.2 1996/08/19 08:32:30 tholo Exp $"; +static char rcsid[] = "$OpenBSD: fgetpos.c,v 1.3 2000/02/21 22:11:21 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> +/* + * fgetpos: like ftello. + */ int fgetpos(fp, pos) FILE *fp; fpos_t *pos; { - return((*pos = ftell(fp)) == (fpos_t)-1); + return((*pos = ftello(fp)) == (fpos_t)-1); } |