summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-03-15 05:54:22 +0000
committerwtc%netscape.com <devnull@localhost>2002-03-15 05:54:22 +0000
commit9b5fe9c1797dd1eca032f10ca0e571c97b2fca19 (patch)
treefee6755633439ce6aef065e4471f3015411eab1e
parentddf5effa000987f4a9fe6c70a050db8e3fc53299 (diff)
downloadnss-hg-9b5fe9c1797dd1eca032f10ca0e571c97b2fca19.tar.gz
Bugzilla bug 131057: define PORT_Strdup as PL_strdup so that it uses NSPR's
memory allocator. r=mcgreer. Modified files: secport.c secport.h
-rw-r--r--security/nss/lib/util/secport.c16
-rw-r--r--security/nss/lib/util/secport.h6
2 files changed, 1 insertions, 21 deletions
diff --git a/security/nss/lib/util/secport.c b/security/nss/lib/util/secport.c
index 6216df3da..bfde55a81 100644
--- a/security/nss/lib/util/secport.c
+++ b/security/nss/lib/util/secport.c
@@ -128,22 +128,6 @@ PORT_Realloc(void *oldptr, size_t bytes)
return rv;
}
-#ifdef XP_MAC
-char *
-PORT_Strdup(const char *cp)
-{
- size_t len = PORT_Strlen(cp);
- char *buf;
-
- buf = (char *)PORT_Alloc(len+1);
- if (buf == NULL) return;
-
- PORT_Memcpy(buf,cp,len+1);
- return buf;
-}
-#endif
-
-
void *
PORT_ZAlloc(size_t bytes)
{
diff --git a/security/nss/lib/util/secport.h b/security/nss/lib/util/secport.h
index 245754390..c89c7dcd5 100644
--- a/security/nss/lib/util/secport.h
+++ b/security/nss/lib/util/secport.h
@@ -206,11 +206,7 @@ extern char *PORT_ArenaStrdup(PLArenaPool *arena, char *str);
#define PORT_Strrchr PL_strrchr
#define PORT_Strcmp strcmp
#define PORT_Strcpy strcpy
-#ifdef XP_MAC
-char *PORT_Strdup(const char *);
-#else
-#define PORT_Strdup strdup
-#endif
+#define PORT_Strdup PL_strdup
#define PORT_Strlen(s) strlen(s)
#define PORT_Strncasecmp PL_strncasecmp
#define PORT_Strncat strncat