aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-06 16:48:14 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-06 16:48:14 -0700
commit03af952060fee063679864d82cdd76f94d56d263 (patch)
treec5d020757b7fdb3e5d266bbc802e0f7f3798153c /libio
parentc5757acd6e9aafcf042b6cd6d7f9e70d957e1e3a (diff)
downloadglibc-03af952060fee063679864d82cdd76f94d56d263.tar
glibc-03af952060fee063679864d82cdd76f94d56d263.tar.gz
glibc-03af952060fee063679864d82cdd76f94d56d263.tar.bz2
glibc-03af952060fee063679864d82cdd76f94d56d263.zip
Clean up lockf64, fseeko64, ftello64, fgetpos64, fsetpos64 for off64_t == off_t.
Diffstat (limited to 'libio')
-rw-r--r--libio/fseeko.c6
-rw-r--r--libio/fseeko64.c7
-rw-r--r--libio/ftello.c7
-rw-r--r--libio/ftello64.c6
-rw-r--r--libio/iofgetpos.c20
-rw-r--r--libio/iofgetpos64.c6
-rw-r--r--libio/iofsetpos.c20
-rw-r--r--libio/iofsetpos64.c7
8 files changed, 65 insertions, 14 deletions
diff --git a/libio/fseeko.c b/libio/fseeko.c
index 7a70636e57..6d37aeaab8 100644
--- a/libio/fseeko.c
+++ b/libio/fseeko.c
@@ -1,4 +1,4 @@
-/* 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
@@ -40,3 +40,7 @@ fseeko (fp, offset, whence)
_IO_release_lock (fp);
return result;
}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (fseeko, fseeko64)
+#endif
diff --git a/libio/fseeko64.c b/libio/fseeko64.c
index 2291f61487..9fbe308c56 100644
--- a/libio/fseeko64.c
+++ b/libio/fseeko64.c
@@ -1,4 +1,4 @@
-/* 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
@@ -28,6 +28,9 @@
#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;
@@ -46,3 +49,5 @@ fseeko64 (fp, offset, whence)
return -1;
#endif
}
+
+#endif
diff --git a/libio/ftello.c b/libio/ftello.c
index 1d85bc6e4c..90522769ea 100644
--- a/libio/ftello.c
+++ b/libio/ftello.c
@@ -1,5 +1,4 @@
-/* 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
@@ -63,3 +62,7 @@ ftello (fp)
return pos;
}
libc_hidden_def (ftello)
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (ftello, ftello64)
+#endif
diff --git a/libio/ftello64.c b/libio/ftello64.c
index 0f70c6630b..852ef71ebf 100644
--- a/libio/ftello64.c
+++ b/libio/ftello64.c
@@ -1,5 +1,4 @@
-/* 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
@@ -30,6 +29,7 @@
#include <libioP.h>
#include <errno.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
off64_t
ftello64 (fp)
@@ -60,3 +60,5 @@ ftello64 (fp)
return -1;
#endif
}
+
+#endif
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index 4338b5097a..a1d6bb693a 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -1,5 +1,4 @@
-/* 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
@@ -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_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>
@@ -78,3 +87,10 @@ _IO_new_fgetpos (fp, posp)
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
diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c
index 0cb141b143..9755c32734 100644
--- a/libio/iofgetpos64.c
+++ b/libio/iofgetpos64.c
@@ -1,5 +1,4 @@
-/* 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
@@ -29,6 +28,7 @@
#include <errno.h>
#include <shlib-compat.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
int
_IO_new_fgetpos64 (fp, posp)
@@ -75,3 +75,5 @@ _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
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 <libioP.h>
+
+#undef _IO_new_fsetpos64
+#undef _IO_fsetpos64
+
#include <errno.h>
#include <shlib-compat.h>
@@ -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
diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c
index 9835c127c1..20edd8dd65 100644
--- a/libio/iofsetpos64.c
+++ b/libio/iofsetpos64.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
@@ -29,6 +28,8 @@
#include <errno.h>
#include <shlib-compat.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
+
int
_IO_new_fsetpos64 (fp, posp)
_IO_FILE *fp;
@@ -68,3 +69,5 @@ _IO_new_fsetpos64 (fp, posp)
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