]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/platform.h
1 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
11 * platform.h - platform-dependent C functions
19 #ifndef _CK_PLATFORM_H_
20 #define _CK_PLATFORM_H_
29 /* many ways to determin macintosh - different for 68k, PPC/OS9, X */
30 #if defined(__POWERPC__) || defined(__CFM68K__) || defined(__APPLE__)
32 #define __MAC_BUILD__ 1
36 * Make sure endianness is defined...
38 #if defined(__BIG_ENDIAN__) && defined(__LITTLE_ENDIAN__)
39 #error Hey! multiply defined endianness!
41 #if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
43 #define __BIG_ENDIAN__ 1
44 #elif __i386__ || __i486__
45 #define __LITTLE_ENDIAN__ 1
47 #error Platform dependent work needed
52 * Other platform-dependent functions in platform.c.
55 extern void CKRaise(const char *reason
) __attribute__((noreturn
));
58 * Come up with some kind of "really" random int with which to seed the
59 * random number generator.
61 extern unsigned createRandomSeed(void);
67 #endif /*_CK_PLATFORM_H_*/