not needed with -fno-stack-protector

This commit is contained in:
wilfried 2003-06-16 11:58:10 +00:00
parent aceabeb9e4
commit c07d063745
2 changed files with 0 additions and 96 deletions

View File

@ -1,48 +0,0 @@
$OpenBSD: patch-string_embed_nsEmbedString_cpp,v 1.1.1.1 2003/05/18 20:43:49 wilfried Exp $
--- string/embed/nsEmbedString.cpp.orig Mon Mar 24 23:46:49 2003
+++ string/embed/nsEmbedString.cpp Sun May 18 04:48:33 2003
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include "nsEmbedString.h"
-const PRUnichar gCommonEmptyBuffer[1] = { 0 };
+static const PRUnichar gCommonEmptyBuffer[1] = { 0 };
nsEmbedString::nsEmbedString()
{
@@ -130,7 +130,7 @@ nsEmbedString::Realloc(size_type aNewSiz
PRBool
nsEmbedString::OwnsBuffer() const
{
- return mStr != (char_type*)gCommonEmptyBuffer;
+ return mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0;
}
const nsEmbedString::char_type*
@@ -180,7 +180,7 @@ nsEmbedString::SetLength(size_type aLeng
GrowCapacity(aLength);
mLength = aLength;
- if (mStr != (char_type*)gCommonEmptyBuffer)
+ if (mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0)
AddNullTerminator();
}
@@ -336,7 +336,7 @@ nsEmbedCString::Realloc(size_type aNewSi
PRBool
nsEmbedCString::OwnsBuffer() const
{
- return mStr != (char_type*)gCommonEmptyBuffer;
+ return mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0;
}
const nsEmbedCString::char_type*
@@ -386,7 +386,7 @@ nsEmbedCString::SetLength(size_type aLen
GrowCapacity(aLength);
mLength = aLength;
- if (mStr != (char_type*)gCommonEmptyBuffer)
+ if (mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0)
AddNullTerminator();
}

View File

@ -1,48 +0,0 @@
$OpenBSD: patch-string_embed_nsEmbedString_cpp,v 1.1 2003/05/14 21:50:59 wilfried Exp $
--- string/embed/nsEmbedString.cpp.orig Mon Mar 24 23:46:49 2003
+++ string/embed/nsEmbedString.cpp Wed May 14 10:52:02 2003
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include "nsEmbedString.h"
-const PRUnichar gCommonEmptyBuffer[1] = { 0 };
+static const PRUnichar gCommonEmptyBuffer[1] = { 0 };
nsEmbedString::nsEmbedString()
{
@@ -130,7 +130,7 @@ nsEmbedString::Realloc(size_type aNewSiz
PRBool
nsEmbedString::OwnsBuffer() const
{
- return mStr != (char_type*)gCommonEmptyBuffer;
+ return mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0;
}
const nsEmbedString::char_type*
@@ -180,7 +180,7 @@ nsEmbedString::SetLength(size_type aLeng
GrowCapacity(aLength);
mLength = aLength;
- if (mStr != (char_type*)gCommonEmptyBuffer)
+ if (mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0)
AddNullTerminator();
}
@@ -336,7 +336,7 @@ nsEmbedCString::Realloc(size_type aNewSi
PRBool
nsEmbedCString::OwnsBuffer() const
{
- return mStr != (char_type*)gCommonEmptyBuffer;
+ return mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0;
}
const nsEmbedCString::char_type*
@@ -386,7 +386,7 @@ nsEmbedCString::SetLength(size_type aLen
GrowCapacity(aLength);
mLength = aLength;
- if (mStr != (char_type*)gCommonEmptyBuffer)
+ if (mStr != (char_type*)gCommonEmptyBuffer && mCapacity != 0)
AddNullTerminator();
}