michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "primpl.h" michael@0: michael@0: /* michael@0: * We were not including in optimized builds. On AIX this michael@0: * caused libnspr4.so to export memcpy and some binaries linked with michael@0: * libnspr4.so resolved their memcpy references with libnspr4.so. To michael@0: * be backward compatible with old libnspr4.so binaries, we do not michael@0: * include in optimized builds for AIX. (bug 200561) michael@0: */ michael@0: #if !(defined(AIX) && !defined(DEBUG)) michael@0: #include michael@0: #endif michael@0: michael@0: PRSize _pr_CopyLowBits( michael@0: void *dst, michael@0: PRSize dstlen, michael@0: void *src, michael@0: PRSize srclen ) michael@0: { michael@0: if (srclen <= dstlen) { michael@0: memcpy(dst, src, srclen); michael@0: return srclen; michael@0: } michael@0: #if defined IS_BIG_ENDIAN michael@0: memcpy(dst, (char*)src + (srclen - dstlen), dstlen); michael@0: #else michael@0: memcpy(dst, src, dstlen); michael@0: #endif michael@0: return dstlen; michael@0: } michael@0: michael@0: PR_IMPLEMENT(PRSize) PR_GetRandomNoise( michael@0: void *buf, michael@0: PRSize size michael@0: ) michael@0: { michael@0: return( _PR_MD_GET_RANDOM_NOISE( buf, size )); michael@0: } /* end PR_GetRandomNoise() */ michael@0: /* end prrng.c */