if (is_type_compound(type)) {
fprintf(stderr, ".%s", entry->compound_entry->base.symbol->string);
} else if (is_type_array(type)) {
- fprintf(stderr, "[" SIZET_FMT "]", entry->index);
+ fprintf(stderr, "[%u]", (unsigned) entry->index);
} else {
fprintf(stderr, "-INVALID-");
}
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
-#ifdef _WIN32
-/* default windows runtime does not support %zu */
-#define SIZET_FMT "%u"
-#else
-#define SIZET_FMT "%zu"
-#endif
const symbol_t *sym = ent->symbol;
if (sym != NULL) {
const char *name = sym->string;
- obstack_printf(&obst, SIZET_FMT "%s", strlen(name), name);
+ obstack_printf(&obst, "%u%s", (unsigned) strlen(name), name);
} else {
/* TODO need the first typedef name here */
panic("mangling of unnamed class/enum types not implemented yet");
obstack_1grow(&obst, 'A');
obstack_1grow(&obst, '_');
} else if (type->size_constant) {
- obstack_printf(&obst, "A" SIZET_FMT "_", type->size);
+ obstack_printf(&obst, "A%u_", (unsigned) type->size);
} else {
panic("mangling of non-constant sized array types not implemented yet");
}
/* TODO: mangle scope */
const char *name = entity->base.symbol->string;
- obstack_printf(&obst, SIZET_FMT "%s", strlen(name), name);
+ obstack_printf(&obst, "%u%s", (unsigned) strlen(name), name);
if (entity->kind == ENTITY_FUNCTION) {
mangle_parameters(&entity->declaration.type->function);
fprintf(stderr, ".%s",
entry->v.compound_entry->base.symbol->string);
} else if (is_type_array(type)) {
- fprintf(stderr, "[" SIZET_FMT "]", entry->v.index);
+ fprintf(stderr, "[%u]", (unsigned) entry->v.index);
} else {
fprintf(stderr, "-INVALID-");
}