]>
git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/snacc.h
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
24 * $Header: /cvs/Darwin/Security/SecuritySNACCRuntime/snacc.h,v 1.1.1.1 2001/05/18 23:14:04 mb Exp $
26 * Revision 1.1.1.1 2001/05/18 23:14:04 mb
27 * Move from private repository to open source repository
29 * Revision 1.2 2001/05/05 00:59:16 rmurphy
30 * Adding darwin license headers
32 * Revision 1.1.1.1 1999/03/16 18:05:50 aram
33 * Originals from SMIME Free Library.
35 * Revision 1.7 1997/04/07 13:13:18 wan
36 * Made more C++ readable (credits to Steve Walker)
38 * Revision 1.6 1997/02/28 13:39:35 wan
39 * Modifications collected for new version 1.3: Bug fixes, tk4.2.
41 * Revision 1.5 1997/02/15 20:38:48 rj
42 * In member functions, return *this after calling abort() for stupid compilers that don't seem to know about volatile abort() (they would otherwise abort with an error).
44 * Revision 1.4 1995/07/24 15:06:52 rj
45 * configure checks for mem* functions. define replacements using b* functions, if necessary.
65 #if HAVE_MEMCMP /* memcmp(3) returns <0, 0 and 0, bcmp(3) returns only 0 and !0 */
66 #define memcmpeq( a, b, len) memcmp (a, b, len)
68 #define memcmpeq( a, b, len) bcmp (a, b, len)
71 #define memzero( p, len) memset (p, 0, len)
73 #define memzero( p, len) bzero (p, len)
76 #define memcpy( dst, src, len) bcopy (src, dst, len)
81 #ifdef VOLATILE_RETRUN
82 # define RETURN_THIS_FOR_COMPILERS_WITHOUT_VOLATILE_FUNCTIONS return *this;
84 # define RETURN_THIS_FOR_COMPILERS_WITHOUT_VOLATILE_FUNCTIONS
89 // enum bool { false, true };
90 // the above looks elegant, but leads to anachronisms (<, ==, !=, ... return value of type int, not enum bool), therefore:
96 #else /* !__cplusplus */
105 #endif /* __cplusplus */
108 * Inspired by gdb 4.0, for better or worse...
109 * (grabbed from Barry Brachman - MS)
111 * These macros munge C routine declarations such
112 * that they work for ANSI or non-ANSI C compilers
114 #ifdef __USE_ANSI_C__
117 #define PARAMS( arglist, args) (args)
118 #define NOPARAMS() (void)
122 #else /* !__USE_ANSI_C__ */
125 #define PARAMS( arglist, args) arglist args;
126 #define NOPARAMS() ()
131 #endif /* __USE_ANSI_C__ */
136 #define TCL (HAVE_TCL && !NO_TCL)
137 #define META (TCL && !NO_META)
165 #define if_IBM_ENC( code) code
167 #define if_IBM_ENC( code)
171 #define if_META( code) code
173 #define if_META( code)
177 #define if_TCL( code) code
179 #define if_TCL( code)
182 #ifndef _gVDADER_RULES
183 extern int gVDADER_RULES
;
186 #endif /* _SNACC_H_ */