From 03af952060fee063679864d82cdd76f94d56d263 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 6 Aug 2012 16:48:14 -0700 Subject: Clean up lockf64, fseeko64, ftello64, fgetpos64, fsetpos64 for off64_t == off_t. --- libio/iofsetpos.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'libio/iofsetpos.c') diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c index 19bea3b08f..5e8d444d2e 100644 --- a/libio/iofsetpos.c +++ b/libio/iofsetpos.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003 - Free Software Foundation, Inc. +/* Copyright (C) 1993-2012 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 @@ -25,7 +24,17 @@ This exception applies to code released by its copyright holders in files containing the exception. */ +/* We need to avoid the header declarations of these, because + the types don't match _IO_fsetpos and then the compiler will + complain about the mismatch when we do the alias below. */ +#define _IO_new_fsetpos64 __renamed__IO_new_fsetpos64 +#define _IO_fsetpos64 __renamed__IO_fsetpos64 + #include + +#undef _IO_new_fsetpos64 +#undef _IO_fsetpos64 + #include #include @@ -63,3 +72,10 @@ _IO_new_fsetpos (fp, posp) strong_alias (_IO_new_fsetpos, __new_fsetpos) versioned_symbol (libc, _IO_new_fsetpos, _IO_fsetpos, GLIBC_2_2); versioned_symbol (libc, __new_fsetpos, fsetpos, GLIBC_2_2); + +#ifdef __OFF_T_MATCHES_OFF64_T +strong_alias (_IO_new_fsetpos, _IO_new_fsetpos64) +strong_alias (_IO_new_fsetpos64, __new_fsetpos64) +versioned_symbol (libc, __new_fsetpos64, fsetpos64, GLIBC_2_2); +versioned_symbol (libc, _IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2_2); +#endif -- cgit v1.2.1