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.
This commit is contained in:
@ -378,8 +378,8 @@ class fhandler_base
|
||||
virtual int rmdir ();
|
||||
virtual DIR *opendir (int fd) __attribute__ ((regparm (2)));
|
||||
virtual int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
|
||||
virtual _off64_t telldir (DIR *);
|
||||
virtual void seekdir (DIR *, _off64_t);
|
||||
virtual long telldir (DIR *);
|
||||
virtual void seekdir (DIR *, long);
|
||||
virtual void rewinddir (DIR *);
|
||||
virtual int closedir (DIR *);
|
||||
virtual bool is_slow () {return false;}
|
||||
@ -774,8 +774,8 @@ class fhandler_disk_file: public fhandler_base
|
||||
int rmdir ();
|
||||
DIR *opendir (int fd) __attribute__ ((regparm (2)));
|
||||
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
|
||||
_off64_t telldir (DIR *);
|
||||
void seekdir (DIR *, _off64_t);
|
||||
long telldir (DIR *);
|
||||
void seekdir (DIR *, long);
|
||||
void rewinddir (DIR *);
|
||||
int closedir (DIR *);
|
||||
|
||||
@ -1333,8 +1333,8 @@ class fhandler_virtual : public fhandler_base
|
||||
|
||||
virtual int exists();
|
||||
DIR *opendir (int fd) __attribute__ ((regparm (2)));
|
||||
_off64_t telldir (DIR *);
|
||||
void seekdir (DIR *, _off64_t);
|
||||
long telldir (DIR *);
|
||||
void seekdir (DIR *, long);
|
||||
void rewinddir (DIR *);
|
||||
int closedir (DIR *);
|
||||
ssize_t __stdcall write (const void *ptr, size_t len);
|
||||
@ -1372,7 +1372,7 @@ class fhandler_netdrive: public fhandler_virtual
|
||||
fhandler_netdrive ();
|
||||
int exists();
|
||||
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
|
||||
void seekdir (DIR *, _off64_t);
|
||||
void seekdir (DIR *, long);
|
||||
void rewinddir (DIR *);
|
||||
int closedir (DIR *);
|
||||
int open (int flags, mode_t mode = 0);
|
||||
@ -1390,8 +1390,8 @@ class fhandler_registry: public fhandler_proc
|
||||
void set_name (path_conv &pc);
|
||||
int exists();
|
||||
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
|
||||
_off64_t telldir (DIR *);
|
||||
void seekdir (DIR *, _off64_t);
|
||||
long telldir (DIR *);
|
||||
void seekdir (DIR *, long);
|
||||
void rewinddir (DIR *);
|
||||
int closedir (DIR *);
|
||||
|
||||
|
Reference in New Issue
Block a user