summaryrefslogtreecommitdiff
path: root/www/mozilla/patches
diff options
context:
space:
mode:
Diffstat (limited to 'www/mozilla/patches')
-rw-r--r--www/mozilla/patches/patch-bk31
-rw-r--r--www/mozilla/patches/patch-bl44
2 files changed, 75 insertions, 0 deletions
diff --git a/www/mozilla/patches/patch-bk b/www/mozilla/patches/patch-bk
new file mode 100644
index 00000000000..2452d3a931b
--- /dev/null
+++ b/www/mozilla/patches/patch-bk
@@ -0,0 +1,31 @@
+$NetBSD: patch-bk,v 1.5 2002/09/03 14:58:18 mycroft Exp $
+
+--- xpcom/ds/nsRecyclingAllocator.cpp.orig Sat Sep 3 14:38:03 2022
++++ xpcom/ds/nsRecyclingAllocator.cpp Sat Sep 3 14:35:24 2022
+@@ -159,7 +159,7 @@
+
+ // Allocation and free routines
+ void*
+-nsRecyclingAllocator::Malloc(PRUint32 bytes, PRBool zeroit)
++nsRecyclingAllocator::Malloc(PRSize bytes, PRBool zeroit)
+ {
+ // Mark that we are using. This will prevent any
+ // timer based release of unused memory.
+@@ -173,7 +173,7 @@
+
+ // We need to do an allocation
+ // Add 4 bytes to what we allocate to hold the bucket index
+- PRUint32 allocBytes = bytes + NS_ALLOCATOR_OVERHEAD_BYTES;
++ PRSize allocBytes = bytes + NS_ALLOCATOR_OVERHEAD_BYTES;
+
+ // We dont have that memory already. Allocate.
+ Block *ptr = (Block *) (zeroit ? calloc(1, allocBytes) : malloc(allocBytes));
+@@ -275,7 +275,7 @@
+ }
+
+ nsRecyclingAllocator::Block*
+-nsRecyclingAllocator::FindFreeBlock(PRUint32 bytes)
++nsRecyclingAllocator::FindFreeBlock(PRSize bytes)
+ {
+ // We dont enter lock for this check. This is intentional.
+ // Here is my logic: we are checking if (!mFreeList). Doing this check
diff --git a/www/mozilla/patches/patch-bl b/www/mozilla/patches/patch-bl
new file mode 100644
index 00000000000..341d62e1518
--- /dev/null
+++ b/www/mozilla/patches/patch-bl
@@ -0,0 +1,44 @@
+$NetBSD: patch-bl,v 1.1 2002/09/03 14:58:18 mycroft Exp $
+
+--- xpcom/ds/nsRecyclingAllocator.h.orig Sat Sep 3 14:38:24 2022
++++ xpcom/ds/nsRecyclingAllocator.h Sat Sep 3 14:36:54 2022
+@@ -78,7 +78,7 @@
+ class NS_COM nsRecyclingAllocator {
+ protected:
+ struct Block {
+- PRUint32 bytes;
++ PRSize bytes;
+ };
+
+ // Make |BlockStoreNode| a |friend| so it can access |Block|.
+@@ -87,7 +87,7 @@
+
+ struct BlockStoreNode {
+ BlockStoreNode() : bytes(0), block(nsnull), next(nsnull) {};
+- PRUint32 bytes;
++ PRSize bytes;
+ Block *block;
+ BlockStoreNode *next;
+ };
+@@ -150,10 +150,10 @@
+ nsresult Init(PRUint32 nbucket, PRUint32 recycleAfter, const char *id);
+
+ // Allocation and free routines
+- void* Malloc(PRUint32 size, PRBool zeroit = PR_FALSE);
++ void* Malloc(PRSize size, PRBool zeroit = PR_FALSE);
+ void Free(void *ptr);
+
+- void* Calloc(PRUint32 items, PRUint32 size)
++ void* Calloc(PRUint32 items, PRSize size)
+ {
+ return Malloc(items * size, PR_TRUE);
+ }
+@@ -168,7 +169,7 @@
+
+ // Freelist management
+ // FindFreeBlock: return a free block that can hold bytes (best fit)
+- Block* FindFreeBlock(PRUint32 bytes);
++ Block* FindFreeBlock(PRSize bytes);
+ // AddToFreeList: adds block into our freelist for future retrieval.
+ // Returns PR_TRUE is addition was successful. PR_FALSE otherewise.
+ PRBool AddToFreeList(Block* block);