]>
git.saurik.com Git - apple/security.git/blob - AppleCSP/MiscCSPAlgs/platform.h
1 /* Copyright (c) 1998 Apple Computer, 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 COMPUTER, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE COMPUTER,
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
15 * 6 Sep 96 Doug Mitchell at NeXT
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 #define bcopy(s, d, l) memmove(d, s, l)
53 #define bzero(s, l) memset(s, 0, l)
54 #define bcmp(s, d, l) memcmp(s, d, l)
61 #endif /*_CK_PLATFORM_H_*/