Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -359,16 +359,16 @@ [element addChild: [OFXMLElement elementWithName: @"seconds" namespace: OF_SERIALIZATION_NS stringValue: [OFString stringWithFormat: - @"%" PRId64, seconds]]]; + @"%" @PRId64, seconds]]]; [element addChild: [OFXMLElement elementWithName: @"microseconds" namespace: OF_SERIALIZATION_NS stringValue: [OFString stringWithFormat: - @"%" PRIu32, microseconds]]]; + @"%" @PRIu32, microseconds]]]; [pool release]; return element; } Index: src/of_asprintf.m ================================================================== --- src/of_asprintf.m +++ src/of_asprintf.m @@ -170,12 +170,17 @@ break; case 'l': /* and also ll */ if (ctx->formatLen > ctx->i + 1 && ctx->format[ctx->i + 1] == 'l') { +#ifndef _WIN32 if (!appendSubformat(ctx, ctx->format + ctx->i, 2)) return false; +#else + if (!appendSubformat(ctx, "I64", 3)) + return false; +#endif ctx->i++; ctx->lengthModifier = LENGTH_MODIFIER_LL; } else { if (!appendSubformat(ctx, ctx->format + ctx->i, 1)) @@ -184,12 +189,17 @@ ctx->lengthModifier = LENGTH_MODIFIER_L; } break; case 'j': +#ifndef _WIN32 if (!appendSubformat(ctx, ctx->format + ctx->i, 1)) return false; +#else + if (!appendSubformat(ctx, "I64", 3)) + return false; +#endif ctx->lengthModifier = LENGTH_MODIFIER_J; break; case 'z': @@ -211,10 +221,25 @@ return false; ctx->lengthModifier = LENGTH_MODIFIER_CAPITAL_L; break; +#ifdef _WIN32 + case 'I': /* win32 strangeness (I64 instead of ll or j) */ + if (ctx->formatLen > ctx->i + 2 && + ctx->format[ctx->i + 1] == '6' && + ctx->format[ctx->i + 2] == '4') { + if (!appendSubformat(ctx, ctx->format + ctx->i, 3)) + return false; + + ctx->i += 2; + ctx->lengthModifier = LENGTH_MODIFIER_LL; + } else + ctx->i--; + + break; +#endif default: ctx->i--; break; }