64 bit fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34324 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+23
-19
@@ -115,7 +115,7 @@ write_code(uint32 value)
|
|||||||
if (make_code(value, code))
|
if (make_code(value, code))
|
||||||
fprintf(sOutputFile, "'%s'", code);
|
fprintf(sOutputFile, "'%s'", code);
|
||||||
else
|
else
|
||||||
fprintf(sOutputFile, "%lu", value);
|
fprintf(sOutputFile, "%" B_PRIu32, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -188,21 +188,24 @@ static void
|
|||||||
write_rsrc(type_code type, int32 id, const char *name)
|
write_rsrc(type_code type, int32 id, const char *name)
|
||||||
{
|
{
|
||||||
if (name[0] == '\0') {
|
if (name[0] == '\0') {
|
||||||
fprintf(sOutputFile, "resource(%ld) ", id);
|
fprintf(sOutputFile, "resource(%" B_PRId32 ") ", id);
|
||||||
} else if ((flags & RDEF_AUTO_NAMES) != 0&& is_ident(name)) {
|
} else if ((flags & RDEF_AUTO_NAMES) != 0&& is_ident(name)) {
|
||||||
char code[5];
|
char code[5];
|
||||||
if (has_prefix(name)) {
|
if (has_prefix(name)) {
|
||||||
fprintf(sOutputFile, "resource(%s) ", name);
|
fprintf(sOutputFile, "resource(%s) ", name);
|
||||||
fprintf(sHeaderFile, "\t%s = %ld,\n", name, id);
|
fprintf(sHeaderFile, "\t%s = %" B_PRId32 ",\n", name, id);
|
||||||
} else if (make_code(type, code)) {
|
} else if (make_code(type, code)) {
|
||||||
fprintf(sOutputFile, "resource(%s%s_%s) ", PREFIX, code, name);
|
fprintf(sOutputFile, "resource(%s%s_%s) ", PREFIX, code, name);
|
||||||
fprintf(sHeaderFile, "\t%s%s_%s = %ld,\n", PREFIX, code, name, id);
|
fprintf(sHeaderFile, "\t%s%s_%s = %" B_PRId32 ",\n", PREFIX, code,
|
||||||
|
name, id);
|
||||||
} else {
|
} else {
|
||||||
fprintf(sOutputFile, "resource(%s%ld_%s) ", PREFIX, type, name);
|
fprintf(sOutputFile, "resource(%s%" B_PRIu32 "_%s) ", PREFIX,
|
||||||
fprintf(sHeaderFile, "\t%s%ld_%s = %ld,\n", PREFIX, type, name, id);
|
(uint32)type, name);
|
||||||
|
fprintf(sHeaderFile, "\t%s%" B_PRIu32 "_%s = %" B_PRId32 ",\n",
|
||||||
|
PREFIX, (uint32)type, name, id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(sOutputFile, "resource(%ld, \"%s\") ", id, name);
|
fprintf(sOutputFile, "resource(%" B_PRId32 ", \"%s\") ", id, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,7 +316,7 @@ write_int32(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_INT32_TYPE, data, length);
|
write_raw(name, B_INT32_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "%ld", *(int32 *)data);
|
fprintf(sOutputFile, "%" B_PRId32, *(int32 *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +328,7 @@ write_int64(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_INT64_TYPE, data, length);
|
write_raw(name, B_INT64_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(int64)%lld", *(int64 *)data);
|
fprintf(sOutputFile, "(int64)%" B_PRId64, *(int64 *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +364,7 @@ write_uint32(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_UINT32_TYPE, data, length);
|
write_raw(name, B_UINT32_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(uint32)%lu", *(uint32 *)data);
|
fprintf(sOutputFile, "(uint32)%" B_PRIu32, *(uint32 *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,7 +376,7 @@ write_uint64(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_UINT64_TYPE, data, length);
|
write_raw(name, B_UINT64_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(uint64)%llu", *(uint64 *)data);
|
fprintf(sOutputFile, "(uint64)%" B_PRIu64, *(uint64 *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +412,7 @@ write_size(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_SIZE_T_TYPE, data, length);
|
write_raw(name, B_SIZE_T_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(size_t)%lu", *(size_t *)data);
|
fprintf(sOutputFile, "(size_t)%lu", (unsigned long)*(size_t *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,7 +424,7 @@ write_ssize(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_SSIZE_T_TYPE, data, length);
|
write_raw(name, B_SSIZE_T_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(ssize_t)%ld", *(ssize_t *)data);
|
fprintf(sOutputFile, "(ssize_t)%ld", (long)*(ssize_t *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,7 +436,7 @@ write_off(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_OFF_T_TYPE, data, length);
|
write_raw(name, B_OFF_T_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(off_t)%lld", *(off_t *)data);
|
fprintf(sOutputFile, "(off_t)%" B_PRIdOFF, *(off_t *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,7 +448,7 @@ write_time(const char *name, const void *data, size_t length)
|
|||||||
write_raw(name, B_TIME_TYPE, data, length);
|
write_raw(name, B_TIME_TYPE, data, length);
|
||||||
} else {
|
} else {
|
||||||
write_field_name(name);
|
write_field_name(name);
|
||||||
fprintf(sOutputFile, "(time_t)%ld", *(time_t *)data);
|
fprintf(sOutputFile, "(time_t)%ld", (long)*(time_t *)data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -755,9 +758,10 @@ write_app_version(const void *data, size_t length)
|
|||||||
fputs("resource app_version", sOutputFile);
|
fputs("resource app_version", sOutputFile);
|
||||||
open_brace();
|
open_brace();
|
||||||
|
|
||||||
fprintf(sOutputFile, "\tmajor = %ld,\n"
|
fprintf(sOutputFile, "\tmajor = %" B_PRIu32 ",\n"
|
||||||
"\tmiddle = %ld,\n"
|
"\tmiddle = %" B_PRIu32 ",\n"
|
||||||
"\tminor = %ld,\n\n", version->major, version->middle, version->minor);
|
"\tminor = %" B_PRIu32 ",\n\n", version->major, version->middle,
|
||||||
|
version->minor);
|
||||||
|
|
||||||
const char *variety = "B_APPV_DEVELOPMENT";
|
const char *variety = "B_APPV_DEVELOPMENT";
|
||||||
switch (version->variety) {
|
switch (version->variety) {
|
||||||
@@ -778,7 +782,7 @@ write_app_version(const void *data, size_t length)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf(sOutputFile, "\tvariety = %s,\n"
|
fprintf(sOutputFile, "\tvariety = %s,\n"
|
||||||
"\tinternal = %ld,\n\n", variety, version->internal);
|
"\tinternal = %" B_PRIu32 ",\n\n", variety, version->internal);
|
||||||
|
|
||||||
fprintf(sOutputFile, "\tshort_info = ");
|
fprintf(sOutputFile, "\tshort_info = ");
|
||||||
write_string(NULL, B_STRING_TYPE, version->short_info, strlen(version->short_info));
|
write_string(NULL, B_STRING_TYPE, version->short_info, strlen(version->short_info));
|
||||||
|
|||||||
Reference in New Issue
Block a user