Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: nspr/pr/src/misc/prrng.c

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « nspr/pr/src/misc/prolock.c ('k') | nspr/pr/src/misc/prsystem.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #include "primpl.h"
7
8 /*
9 * We were not including <string.h> in optimized builds. On AIX this
10 * caused libnspr4.so to export memcpy and some binaries linked with
11 * libnspr4.so resolved their memcpy references with libnspr4.so. To
12 * be backward compatible with old libnspr4.so binaries, we do not
13 * include <string.h> in optimized builds for AIX. (bug 200561)
14 */
15 #if !(defined(AIX) && !defined(DEBUG))
16 #include <string.h>
17 #endif
18
19 PRSize _pr_CopyLowBits(
20 void *dst,
21 PRSize dstlen,
22 void *src,
23 PRSize srclen )
24 {
25 if (srclen <= dstlen) {
26 memcpy(dst, src, srclen);
27 return srclen;
28 }
29 #if defined IS_BIG_ENDIAN
30 memcpy(dst, (char*)src + (srclen - dstlen), dstlen);
31 #else
32 memcpy(dst, src, dstlen);
33 #endif
34 return dstlen;
35 }
36
37 PR_IMPLEMENT(PRSize) PR_GetRandomNoise(
38 void *buf,
39 PRSize size
40 )
41 {
42 return( _PR_MD_GET_RANDOM_NOISE( buf, size ));
43 } /* end PR_GetRandomNoise() */
44 /* end prrng.c */
OLDNEW
« no previous file with comments | « nspr/pr/src/misc/prolock.c ('k') | nspr/pr/src/misc/prsystem.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698