+2012-08-06 Roland McGrath <roland@hack.frob.com>
+
+ * io/lockf.c [__OFF_T_MATCHES_OFF64_T]:
+ Define lockf64 as an alias.
+ * libio/fseeko.c [__OFF_T_MATCHES_OFF64_T]:
+ Define fseeko64 as an alias.
+ * libio/ftello.c [__OFF_T_MATCHES_OFF64_T]:
+ Define ftello64 as an alias.
+ * libio/iofgetpos.c [__OFF_T_MATCHES_OFF64_T]:
+ Define _IO_fgetpos64 and fgetpos64 as aliases.
+ * libio/iofsetpos.c [__OFF_T_MATCHES_OFF64_T]:
+ Define _IO_fsetpos64 and fsetpos64 as aliases.
+ * io/lockf64.c [!__OFF_T_MATCHES_OFF64_T]:
+ Conditionalize body on this.
+ * libio/fseeko64.c: Likewise.
+ * libio/ftello64.c: Likewise.
+ * libio/iofgetpos64.c: Likewise.
+ * libio/iofsetpos64.c: Likewise.
+ * sysdeps/wordsize-64/lockf.c: File removed.
+ * sysdeps/wordsize-64/lockf64.c: File removed.
+ * sysdeps/wordsize-64/fseeko.c: File removed.
+ * sysdeps/wordsize-64/fseeko64.c: File removed.
+ * sysdeps/wordsize-64/ftello.c: File removed.
+ * sysdeps/wordsize-64/ftello64.c: File removed.
+ * sysdeps/wordsize-64/iofgetpos.c: File removed.
+ * sysdeps/wordsize-64/iofgetpos64.c: File removed.
+ * sysdeps/wordsize-64/iofsetpos.c: File removed.
+ * sysdeps/wordsize-64/iofsetpos64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/lockf.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/lockf64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/fseeko.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/fseeko64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/ftello.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/ftello64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos64.c: File removed.
+
+ * bits/typesizes.h [__LP64__] (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/sysv/linux/s390/bits/typesizes.h:
+ [__s390x__] (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+ [defined __arch64__ || defined __sparcv9]
+ (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+ [__x86_64__] (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
+ (__OFF_T_MATCHES_OFF64_T): New macro.
+
2012-08-06 H.J. Lu <hongjiu.lu@intel.com>
* stdlib/secure-getenv.c (__secure_getenv): Replace
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#ifdef __LP64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
-/* Copyright (C) 1994,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1994-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
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We need to avoid the header declaration of lockf64, because
+ the types don't match lockf and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define lockf64 __renamed_lockf64
+
+#include <fcntl.h>
+
+#undef lockf64
+
#include <sys/types.h>
#include <unistd.h>
-#include <fcntl.h>
#include <errno.h>
#include <string.h>
the fcntl() function will take care of it. */
return __fcntl (fd, cmd, &fl);
}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (lockf, lockf64)
+#endif
-/* Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994-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
#include <errno.h>
#include <string.h>
+/* lockf.c defines lockf64 as an lias if __OFF_T_MATCHES_OFF64_T. */
+#ifndef __OFF_T_MATCHES_OFF64_T
+
/* lockf is a simplified interface to fcntl's locking facilities. */
int
return __fcntl (fd, cmd, &fl);
}
+
+#endif
-/* Copyright (C) 1993,1995,1996,1997,1998,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
_IO_release_lock (fp);
return result;
}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (fseeko, fseeko64)
+#endif
-/* Copyright (C) 1993,1995,1996,1997,1998,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
#include "libioP.h"
#include "stdio.h"
+/* fseeko.c defines this as an alias if __OFF_T_MATCHES_OFF64_T. */
+#ifndef __OFF_T_MATCHES_OFF64_T
+
int
fseeko64 (fp, offset, whence)
_IO_FILE* fp;
return -1;
#endif
}
+
+#endif
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004, 2007
- 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
return pos;
}
libc_hidden_def (ftello)
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (ftello, ftello64)
+#endif
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004
- 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
#include <libioP.h>
#include <errno.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
off64_t
ftello64 (fp)
return -1;
#endif
}
+
+#endif
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004
- 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
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_fgetpos and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define _IO_new_fgetpos64 __renamed__IO_new_fgetpos64
+#define _IO_fgetpos64 __renamed__IO_fgetpos64
+
#include "libioP.h"
+
+#undef _IO_new_fgetpos64
+#undef _IO_fgetpos64
+
#include <errno.h>
#include <stdlib.h>
#include <shlib-compat.h>
strong_alias (_IO_new_fgetpos, __new_fgetpos)
versioned_symbol (libc, _IO_new_fgetpos, _IO_fgetpos, GLIBC_2_2);
versioned_symbol (libc, __new_fgetpos, fgetpos, GLIBC_2_2);
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (_IO_new_fgetpos, _IO_new_fgetpos64)
+strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
+versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
+versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
+#endif
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004
- 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
#include <errno.h>
#include <shlib-compat.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
int
_IO_new_fgetpos64 (fp, posp)
strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
+
+#endif
-/* 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
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 <libioP.h>
+
+#undef _IO_new_fsetpos64
+#undef _IO_fsetpos64
+
#include <errno.h>
#include <shlib-compat.h>
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
-/* 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
#include <errno.h>
#include <shlib-compat.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
+
int
_IO_new_fsetpos64 (fp, posp)
_IO_FILE *fp;
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
+2012-08-02 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+ (__OFF_T_MATCHES_OFF64_T): New macro.
+
2012-08-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/alpha/configure.in
+2012-08-02 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/generic/bits/typesizes.h
+ [__LP64__] (__OFF_T_MATCHES_OFF64_T): New macro.
+
2012-05-30 Chris Metcalf <cmetcalf@tilera.com>
* sysdeps/unix/sysv/linux/generic/syscalls.list: Remove
/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-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
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __FSWORD_T_TYPE __S32_TYPE
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+#define __OFF_T_MATCHES_OFF64_T 1
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#ifdef __LP64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+
+/* Tell the libc code that off_t and off64_t are actually the same type. */
+#define __OFF_T_MATCHES_OFF64_T 1
+
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#ifdef __s390x__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#if defined __arch64__ || defined __sparcv9
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
+#ifdef __x86_64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
+++ /dev/null
-#include <sysdeps/wordsize-64/fseeko.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/fseeko64.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/ftello.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/ftello64.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/iofgetpos.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/iofgetpos64.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/iofsetpos.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/iofsetpos64.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/lockf.c>
+++ /dev/null
-#include <sysdeps/wordsize-64/lockf64.c>
+++ /dev/null
-#include "../../libio/fseeko.c"
-
-weak_alias (fseeko, fseeko64)
+++ /dev/null
-/* Defined in fseeko.c. */
+++ /dev/null
-#include "../../libio/ftello.c"
-
-weak_alias (ftello, ftello64)
+++ /dev/null
-/* Defined in ftello.c. */
+++ /dev/null
-#define _IO_new_fgetpos64 __renamed__IO_new_fgetpos64
-#define _IO_fgetpos64 __renamed__IO_fgetpos64
-
-#include "../../libio/iofgetpos.c"
-
-#undef _IO_new_fgetpos64
-#undef _IO_fgetpos64
-
-strong_alias (_IO_new_fgetpos, _IO_new_fgetpos64)
-strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
-versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
-versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
+++ /dev/null
-/* Defined in iofgetpos.c. */
+++ /dev/null
-#define _IO_new_fsetpos64 __renamed__IO_new_fsetpos64
-#define _IO_fsetpos64 __renamed__IO_fsetpos64
-
-#include "../../libio/iofsetpos.c"
-
-#undef _IO_new_fsetpos64
-#undef _IO_fsetpos64
-
-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);
+++ /dev/null
-/* Defined in iofsetpos.c. */
+++ /dev/null
-#include "../../io/lockf.c"
-
-weak_alias (lockf, lockf64)
+++ /dev/null
-/* Defined in lockf.c. */