Loading...
gen/arc4random.c Libc-262 Libc-391
--- Libc/Libc-262/gen/arc4random.c
+++ Libc/Libc-391/gen/arc4random.c
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
 /* $FreeBSD: src/lib/libc/gen/arc4random.c,v 1.4 2000/01/27 23:06:13 jasone Exp $ */
 
 /*
@@ -40,6 +62,7 @@
 static int rs_initialized;
 static struct arc4_stream *rs = NULL;
 
+static inline void arc4_init(struct arc4_stream *) __attribute__((always_inline));
 static inline void
 arc4_init(as)
 	struct arc4_stream *as;
@@ -52,6 +75,7 @@
 	as->j = 0;
 }
 
+static inline void arc4_addrandom(struct arc4_stream *, u_char *, int) __attribute__((always_inline));
 static inline void
 arc4_addrandom(as, dat, datlen)
 	struct arc4_stream *as;
@@ -95,6 +119,7 @@
 	arc4_addrandom(as, (void *) &rdat, sizeof(rdat));
 }
 
+static inline u_int8_t arc4_getbyte(struct arc4_stream *) __attribute__((always_inline));
 static inline u_int8_t
 arc4_getbyte(as)
 	struct arc4_stream *as;
@@ -110,6 +135,7 @@
 	return (as->s[(si + sj) & 0xff]);
 }
 
+static inline u_int32_t arc4_getword(struct arc4_stream *) __attribute__((always_inline));
 static inline u_int32_t
 arc4_getword(as)
 	struct arc4_stream *as;