Re: [PATCH 1/2] compat: introduce stat_to_kilobytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 18.08.2008 um 21:57 schrieb Johannes Sixt:

From: Junio C Hamano <gitster@xxxxxxxxx>

Some platforms do not have st_blocks member in "struct stat"; mingw
already emulates it by rounding it up to closest 512-byte blocks (even
though it could overcount when a file has holes).

The reason to use the member is only to figure out how many kilobytes the file occupies on-disk, so give a helper in git-compat-util.h to help these
platforms.

Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
Acked-by: Johannes Sixt <johannes.sixt@xxxxxxxxxx>
---
On Sonntag, 17. August 2008, Junio C Hamano wrote:
The comment before "struct mingw_stat" suggests that the only reason this compatiblity definition exists is to add st_blocks member, so I suspect we could remove the definition and simplify the compatibility
  layer a lot more, but I do not know MinGW, so I am CC'ing j6t here.

Makes sense. Here it is again, with the Makefile fixup noted by Andreas.

I have tested this on Haiku, compiles okay and simplifies my patches.

Thanks,
Andreas

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux