| diff -aruN nspr-4.8.6/mozilla/nsprpub/pr/include/prprf.h nspr-4.8.6.N/mozilla/nsprpub/pr/include/prprf.h |
| --- nspr-4.8.6/mozilla/nsprpub/pr/include/prprf.h 2004-04-25 08:00:47.000000000 -0700 |
| +++ nspr-4.8.6.N/mozilla/nsprpub/pr/include/prprf.h 2015-05-08 11:15:40.200961412 -0700 |
| @@ -48,6 +48,8 @@ |
| ** %hd, %hu, %hx, %hX, %ho - 16-bit versions of above |
| ** %ld, %lu, %lx, %lX, %lo - 32-bit versions of above |
| ** %lld, %llu, %llx, %llX, %llo - 64 bit versions of above |
| +** %td, %tu, %tx, %tX, %to - PRPtrdiff versions of the above (deals with machine dependent PRPtrdiff size) |
| +** %zd, %zu, %zx, %zX, %zo - PRSize versions of above (deals with machine dependent PRSize size) |
| ** %s - string |
| ** %c - character |
| ** %p - pointer (deals with machine dependent pointer size) |
| diff -aruN nspr-4.8.6/mozilla/nsprpub/pr/src/io/prprf.c nspr-4.8.6.N/mozilla/nsprpub/pr/src/io/prprf.c |
| --- nspr-4.8.6/mozilla/nsprpub/pr/src/io/prprf.c 2008-05-31 08:10:17.000000000 -0700 |
| +++ nspr-4.8.6.N/mozilla/nsprpub/pr/src/io/prprf.c 2015-05-08 11:12:46.305410769 -0700 |
| @@ -820,6 +820,28 @@ |
| type = TYPE_INT64; |
| c = *fmt++; |
| } |
| + } else if (c == 't') { |
| + if (sizeof(PRPtrdiff) == sizeof(PRInt32)) { |
| + type = TYPE_UINT32; |
| + } else if (sizeof(PRPtrdiff) == sizeof(PRInt64)) { |
| + type = TYPE_UINT64; |
| + } else if (sizeof(PRPtrdiff) == sizeof(PRIntn)) { |
| + type = TYPE_UINTN; |
| + } else { |
| + PR_ASSERT(0); |
| + } |
| + c = *fmt++; |
| + } else if (c == 'z') { |
| + if (sizeof(PRSize) == sizeof(PRInt32)) { |
| + type = TYPE_UINT32; |
| + } else if (sizeof(PRSize) == sizeof(PRInt64)) { |
| + type = TYPE_UINT64; |
| + } else if (sizeof(PRSize) == sizeof(PRIntn)) { |
| + type = TYPE_UINTN; |
| + } else { |
| + PR_ASSERT(0); |
| + } |
| + c = *fmt++; |
| } |
| |
| /* format */ |