Cygwin: reduce size of fhandler_cygdrive

fhandler_cygdrive has a size of 696 bytes on x86_64, while the next
biggest fhandler type, fhandler_pty_master, is 584 bytes.  The members
responsible for the size are private to opendir/readdir/closedir usage.
fhandler_disk_file stores private readdir data in DIR->__d_internal
instead.  Use equivalent method with fhandler_cygdrive.  This drops
the size to 464 bytes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-02-26 20:39:48 +01:00
parent b995936ab5
commit fbdae2c216
2 changed files with 26 additions and 27 deletions

View File

@ -1350,14 +1350,6 @@ public:
class fhandler_cygdrive: public fhandler_disk_file
{
enum
{
DRVSZ = sizeof ("x:\\")
};
int ndrives;
const char *pdrive;
char pdrive_buf[1 + (2 * 26 * DRVSZ)];
void set_drives ();
public:
fhandler_cygdrive ();
int open (int flags, mode_t mode);