[misc] fix XP compatibility

* MinGW's gcc 4.9.2 seems to implement a broken "%lld" format 64 bit integer is
  followed by more variables and the app executes on XP => use PRI macros
* Also fix partition ID being ignored when using Rufus MBR
* Also fix some global vars shadowing and add other improvements
This commit is contained in:
Pete Batard 2015-01-28 23:22:11 +00:00
parent 5638519ca0
commit b830c040d2
10 changed files with 48 additions and 45 deletions

View file

@ -57,7 +57,7 @@ static __inline int64_t ReadIniKey64(const char* key) {
}
static __inline BOOL WriteIniKey64(const char* key, int64_t val) {
char str[24];
static_sprintf(str, "%lld", val);
static_sprintf(str, "%" PRIi64, val);
return (set_token_data_file(key, str, ini_file) != NULL);
}