#202 gptsync uses wrong int types on linux x64

open
nobody
5
2011-05-23
2011-05-23
Pete Batard
No

When compiled on linux x86_64 (tested on Slackware 13.37 amd64), gptsync and showpart fails with the following:

Current GPT partition table:
Warning: Unknown GPT spec revision 0x00010000
Floating point error

This apears to be due to using:
typedef unsigned long UINT32;
in gptsync.h, as when editing gptsync.h, including <stdint.h> and setting the UINT## typedef to uint##_t (eg: "typedef uint32_t UINT32;"), everything then works as expected.

Since <stdint.h> should be available on most platforms these days and is part of the C99 standard, I would suggest dropping these problematic typedefs and use the established stdint definitions, which would avoid this type of issue.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks