If you have any problems with the title of this question,
I recently entered the world of C.
I have some code that basically shows the capacity and free space of a disk. It works great on several different Linux distributions I have tried, as well as Solaris and AIX. I recently put together the HP-UX PA-RISC package and got (in my opinion) a really strange error.
struct statfs fsStat; err = statfs(rootPath,&fsStat); unsigned long long totalBytes = (unsigned long long)(fsStat.f_bsize * fsStat.f_blocks);
In GDB, when I do this:
p (fsStat.f_bsize * fsStat.f_blocks)
Result: 1335205888 But after doing the calculation, when I do
p totalByes
The result is 18446744071562067968
Any information that may even give me an idea of ββwhat to try here will be really wonderful. I used to think that I knew how to program, until I started making multi-platform C :(
source share