This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CompactFlash Disk Geometry


Jeff Baker wrote:
> Ok so allow me to correct myself here.  The 'Cylinders' element in the
> DISK_GEOMETRY structure is a LARGE_INTEGER, which isn't being printed by a
> simple printf("%d").  If I print the Cylinders.LowPart element the output
is
> correct.  Since trying to printf a LARGE_INTEGER works on both Visual C
and
> a version of Watcom I have, is this a bug in Cygwin?

Why would you expect %d to print a LARGE_INTEGER? I suspect that your Visual
C and Watcom programs will give incorrect output for values larger than
2^31.

Printing 64-bit ints is rather nonstandard, unfortunately.

For MSVCRT, I guess (untested) you would need %I64d.
For newlib (Cygwin), you will need %lld or %qd.



Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]