Implementation of GetCompressedFileSize[AW]

Sylvain Petreolle spetreolle at yahoo.fr
Wed Oct 1 23:12:09 CDT 2003


> FIXME about GetCompressedFileSizeA was too annoying when running
Cygwin
> programs, so I implemented it.  The code uses st_blocks when possible
to
> account for sparse files and falls back to st_size if st_blocks is
missing
> in struct stat.  The code uses shift operations so that both systems
with
> 32-bit and 64-bit off_t will do their best to provide accurate
results.

Works cool, but you could return INVALID_FILE_SIZE when the function
fails.
I patched it into win32/newfns.c for long time but never sent a patch.

OT : Too bad that we dont have GetProcessMemoryInfo, this is what keeps
cygwin programs unable to start into bash.

=====
Sylvain Petreolle (spetreolle_at_users_dot_sourceforge_dot_net)
 ICQ #170597259
Say NO to software patents
Dites NON aux brevets logiciels

"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com



More information about the wine-devel mailing list