diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 14:28:23 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 14:28:23 +0000 |
commit | dc3064332cec5ca6edc9a44f5f6111e506eb037b (patch) | |
tree | 79686327822b075f3970aec7ef73372142760047 /libio/ftello.c | |
parent | 86af500777f45066aa6a6817d4b695cf4b626c38 (diff) | |
parent | 963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff) |
Merge commit 'refs/top-bases/cvs/exc2signal-template' into cvs/exc2signal-template
Diffstat (limited to 'libio/ftello.c')
-rw-r--r-- | libio/ftello.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libio/ftello.c b/libio/ftello.c index 7122815f2e..5a3caf4ad9 100644 --- a/libio/ftello.c +++ b/libio/ftello.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2016 Free Software Foundation, Inc. +/* Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,16 +24,19 @@ This exception applies to code released by its copyright holders in files containing the exception. */ +/* We need to disable the redirect for __ftello64 for the alias + definitions below to work. */ +#define __ftello64 __ftello64_disable + #include <stdio.h> #include <stdlib.h> #include <libioP.h> #include <errno.h> - off_t -__ftello (_IO_FILE *fp) +__ftello (FILE *fp) { - _IO_off64_t pos; + off64_t pos; CHECK_FILE (fp, -1L); _IO_acquire_lock (fp); pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0); @@ -45,17 +48,13 @@ __ftello (_IO_FILE *fp) _IO_release_lock (fp); if (pos == _IO_pos_BAD) { -#ifdef EIO if (errno == 0) __set_errno (EIO); -#endif return -1L; } - if ((_IO_off64_t) (off_t) pos != pos) + if ((off64_t) (off_t) pos != pos) { -#ifdef EOVERFLOW __set_errno (EOVERFLOW); -#endif return -1L; } return pos; @@ -65,4 +64,7 @@ weak_alias (__ftello, ftello) #ifdef __OFF_T_MATCHES_OFF64_T weak_alias (__ftello, ftello64) +# undef __ftello64 +strong_alias (__ftello, __ftello64) +libc_hidden_ver (__ftello, __ftello64) #endif |