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/include/sys/dirent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/include/sys/dirent.h') diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h index fa059ec30..3d441a20c 100644 --- a/winsup/cygwin/include/sys/dirent.h +++ b/winsup/cygwin/include/sys/dirent.h @@ -38,7 +38,7 @@ typedef struct __DIR unsigned long __d_cookie; struct dirent *__d_dirent; char *__d_dirname; /* directory name with trailing '*' */ - _off_t __d_position; /* used by telldir/seekdir */ + long __d_position; /* used by telldir/seekdir */ int __d_fd; unsigned __d_internal; void *__handle; @@ -58,8 +58,8 @@ int dirfd (DIR *); #ifndef _POSIX_SOURCE #ifndef __INSIDE_CYGWIN__ -off_t telldir (DIR *); -void seekdir (DIR *, off_t loc); +long telldir (DIR *); +void seekdir (DIR *, long loc); #endif int scandir (const char *__dir, -- cgit v1.2.3