> buf->st_blocks = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE; > > which way is preferable? Casting buf->st_size to (unsigned long) before doing the math is. off_t is signed, but negative sizes are meaningless. However, this topic belongs on the newlib list, not the cygwin list.