summaryrefslogtreecommitdiff
path: root/libio/iofgetpos.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:36:51 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:36:51 +0000
commit05fa8834c6644f12405ea713c48693bf2d1864f1 (patch)
treec6b6391884370c75972a2e432d42ebbb076a0cdf /libio/iofgetpos.c
parent525c181a5a9a95e24d2111b7792608151a40eb84 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmemt/bigmem
Diffstat (limited to 'libio/iofgetpos.c')
-rw-r--r--libio/iofgetpos.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index 70b3a6d33f..8177326c9c 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.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
@@ -29,20 +29,22 @@
complain about the mismatch when we do the alias below. */
#define _IO_new_fgetpos64 __renamed__IO_new_fgetpos64
#define _IO_fgetpos64 __renamed__IO_fgetpos64
+#define fgetpos64 __renamed_fgetpos64
#include "libioP.h"
#undef _IO_new_fgetpos64
#undef _IO_fgetpos64
+#undef fgetpos64
#include <errno.h>
#include <stdlib.h>
#include <shlib-compat.h>
int
-_IO_new_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)
+_IO_new_fgetpos (FILE *fp, __fpos_t *posp)
{
- _IO_off64_t pos;
+ off64_t pos;
int result = 0;
CHECK_FILE (fp, EOF);
_IO_acquire_lock (fp);
@@ -56,17 +58,13 @@ _IO_new_fgetpos (_IO_FILE *fp, _IO_fpos_t *posp)
{
/* ANSI explicitly requires setting errno to a positive value on
failure. */
-#ifdef EIO
if (errno == 0)
__set_errno (EIO);
-#endif
result = EOF;
}
- else if ((_IO_off64_t) (__typeof (posp->__pos)) pos != pos)
+ else if ((off64_t) (__typeof (posp->__pos)) pos != pos)
{
-#ifdef EOVERFLOW
__set_errno (EOVERFLOW);
-#endif
result = EOF;
}
else