summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-04-09 02:14:27 +0000
committerwtc%netscape.com <devnull@localhost>2003-04-09 02:14:27 +0000
commitcd4e871a521f90891739f74aab6ad3bc69b6046b (patch)
tree7cbc4fce40570ba0b8e5a74e34b2d12beb2abb95
parentfde4b2acc4702e80c961b85a7db0a6e4f6ccfba0 (diff)
downloadnspr-hg-cd4e871a521f90891739f74aab6ad3bc69b6046b.tar.gz
Bug 200561: do not include <string.h> in optimized builds for AIX so that
memcpy continued to be exported. This is to be "bug compatible" with old libnspr4.so binaries that exported memcpy by accident because we did not include <string.h> in optimized builds.
-rw-r--r--pr/src/misc/prrng.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pr/src/misc/prrng.c b/pr/src/misc/prrng.c
index cb837105..dbbb056e 100644
--- a/pr/src/misc/prrng.c
+++ b/pr/src/misc/prrng.c
@@ -34,7 +34,16 @@
#include "primpl.h"
+/*
+ * We were not including <string.h> in optimized builds. On AIX this
+ * caused libnspr4.so to export memcpy and some binaries linked with
+ * libnspr4.so resolved their memcpy references with libnspr4.so. To
+ * be backward compatible with old libnspr4.so binaries, we do not
+ * include <string.h> in optimized builds for AIX.
+ */
+#if !(defined(AIX) && !defined(DEBUG))
#include <string.h>
+#endif
PRSize _pr_CopyLowBits(
void *dst,