From c492992f13f8a270e535fb49a50315c247e3848b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 5 Jul 2010 16:59:56 +0000 Subject: Align seekdir and telldir API to POSIX definition. * Makefile.in (NEW_FUNCTIONS): Remove seekdir and telldir mappings. * dir.cc (telldir): Move functionality from telldir64 here. Use long, rather than _off_t. (telldir64): Just call telldir. Only keep for backward compatibility. (seekdir): Move functionality from seekdir64 here. Use long, rather than _off_t. (seekdir64): Just call seekdir. Only keep for backward compatibility. * fhandler.h: Throughout, change prototypes of seekdir and telldir methods to use long, rather than _off64_t. * fhandler_disk_file.cc: Change aforementioned methods accordingly. * fhandler_netdrive.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_virtual.cc: Ditto. * include/sys/dirent.h (struct __DIR): Change __d_position from _off_t to long to reflect API change. (telldir): Change prototype to use long, rather than off_t. (seekdir): Ditto. --- winsup/cygwin/fhandler_registry.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler_registry.cc') diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 9c68b2cdd..e414efbb3 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -643,14 +643,14 @@ out: return res; } -_off64_t +long fhandler_registry::telldir (DIR * dir) { return dir->__d_position & REG_POSITION_MASK; } void -fhandler_registry::seekdir (DIR * dir, _off64_t loc) +fhandler_registry::seekdir (DIR * dir, long loc) { /* Unfortunately cannot simply set __d_position due to transition from sub-keys to * values. -- cgit v1.2.3