| Index: nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c
|
| diff --git a/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c b/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c
|
| index 2afd680c6078d99bfb3d6c4ed33c63d54b33161c..6bd0a3a0990ea21c034f8ed35afdb09d0444d867 100644
|
| --- a/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c
|
| +++ b/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c
|
| @@ -62,7 +62,12 @@ static PKIX_Boolean socketTraceFlag = PKIX_FALSE;
|
| static void pkix_pl_socket_timestamp() {
|
| PRInt64 prTime;
|
| prTime = PR_Now();
|
| +/* We shouldn't use PR_ALTERNATE_INT64_TYPEDEF, but nor can we use PRId64 */
|
| +#if PR_BYTES_PER_LONG == 8 && !defined(PR_ALTERNATE_INT64_TYPEDEF)
|
| + printf("%ld:\n", prTime);
|
| +#else
|
| printf("%lld:\n", prTime);
|
| +#endif
|
| }
|
|
|
| /*
|
| @@ -140,7 +145,7 @@ static void pkix_pl_socket_linePrefix(PKIX_UInt32 addr) {
|
| */
|
| static void pkix_pl_socket_traceLine(char *ptr) {
|
| PKIX_UInt32 i = 0;
|
| - pkix_pl_socket_linePrefix((PKIX_UInt32)ptr);
|
| + pkix_pl_socket_linePrefix((PKIX_UInt32)((char *)ptr - (char *)NULL));
|
| for (i = 0; i < 16; i++) {
|
| printf(" ");
|
| pkix_pl_socket_hexDigit(ptr[i]);
|
| @@ -184,7 +189,7 @@ static void pkix_pl_socket_traceLine(char *ptr) {
|
| static void pkix_pl_socket_tracePartialLine(char *ptr, PKIX_UInt32 nBytes) {
|
| PKIX_UInt32 i = 0;
|
| if (nBytes > 0) {
|
| - pkix_pl_socket_linePrefix((PKIX_UInt32)ptr);
|
| + pkix_pl_socket_linePrefix((PKIX_UInt32)((char *)ptr - (char *)NULL));
|
| }
|
| for (i = 0; i < nBytes; i++) {
|
| printf(" ");
|
| @@ -243,7 +248,7 @@ void pkix_pl_socket_tracebuff(void *buf, PKIX_UInt32 nBytes) {
|
| * Special case: if called with length of zero, just do address
|
| */
|
| if (nBytes == 0) {
|
| - pkix_pl_socket_linePrefix((PKIX_UInt32)buf);
|
| + pkix_pl_socket_linePrefix((PKIX_UInt32)((char *)buf - (char *)NULL));
|
| printf("\n");
|
| } else {
|
| while (bytesRemaining >= 16) {
|
|
|