]>
Commit | Line | Data |
---|---|---|
bac41a7b A |
1 | /* |
2 | * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved. | |
3 | * | |
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 | |
8 | * using this file. | |
9 | * | |
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. | |
16 | */ | |
17 | ||
18 | ||
19 | // | |
20 | // utility_config.h - common configuration for the utility libraries | |
21 | // | |
22 | #ifndef _H_UTILITY_CONFIG | |
23 | #define _H_UTILITY_CONFIG | |
24 | ||
25 | // include public configuration | |
26 | #include <Security/cssmconfig.h> | |
27 | ||
28 | // | |
29 | // Headers of varying provenance. | |
30 | // We include these here because they're ubiquitous, and it's too much of a pain | |
31 | // to replicate this logic everywhere. | |
32 | // | |
33 | #if defined(TARGET_OS_MAC) | |
34 | #include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h> | |
35 | #elif defined(TARGET_OS_UNIX) | |
36 | # include <sys/types.h> | |
37 | #endif | |
38 | ||
39 | #include <assert.h> | |
40 | ||
41 | // | |
42 | // Decide what io apis we'll be using | |
43 | // | |
44 | #define _USE_IO_POSIX 0 | |
45 | #define _USE_IO_MACOS 1 | |
46 | ||
47 | #if !defined(_USE_IO) | |
48 | # if TARGET_API_MAC_OS8 | |
49 | # define _USE_IO _USE_IO_MACOS | |
50 | # else | |
51 | # define _USE_IO _USE_IO_POSIX | |
52 | # endif | |
53 | #endif | |
54 | ||
55 | // | |
56 | // Decide what threading support we'll be using | |
57 | // | |
58 | #define _USE_NO_THREADS 0 | |
59 | #define _USE_PTHREADS 1 | |
60 | #define _USE_MPTHREADS 2 | |
61 | ||
62 | #include <unistd.h> | |
63 | #if defined(_POSIX_THREADS) | |
64 | # define _USE_THREADS _USE_PTHREADS | |
65 | #endif | |
66 | #if !defined(_USE_THREADS) | |
67 | # define _USE_THREADS _USE_NO_THREADS | |
68 | #endif | |
69 | ||
70 | ||
71 | // | |
72 | // Compatibility switches | |
73 | // | |
74 | #define COMPAT_OSX_10_0 1 /* be compatible with MacOS 10.0.x formats & features */ | |
75 | ||
76 | ||
77 | // | |
78 | // Bugs, buglets, and special compiler features | |
79 | // | |
80 | #define bug_private private | |
81 | #define bug_protected protected | |
82 | #define bug_const const | |
83 | ||
84 | #define BUG_GCC 0 | |
85 | ||
86 | #if defined(__GNUC__) | |
87 | # undef BUG_GCC | |
88 | # define BUG_GCC 1 | |
89 | # undef bug_const | |
90 | # define bug_const | |
91 | #else | |
92 | # if !defined(__attribute__) | |
93 | # define __attribute__(whatever) /* don't use for non-gcc compilers */ | |
94 | # endif | |
95 | #endif | |
96 | ||
97 | /* | |
98 | ld: for architecture ppc | |
99 | ld: common symbols not allowed with MH_DYLIB output format | |
100 | /Network/Servers/fivestar/homes/delaware/jhurley/AppleDev/insight/build/intermediates/KeychainLib.build/Objects/Sources/KeychainLib/KCSleep.o definition of common __7KCSleep.mKCSleepRec (size 12) | |
101 | */ | |
102 | #define BUG_COMMON_SYMBOLS | |
103 | ||
104 | // Make sure that namespace Security exists | |
105 | namespace Security | |
106 | { | |
107 | } // end namespace Security | |
108 | ||
109 | // Automatically use the Security namespace for everything that includes the utility_config header. | |
110 | using namespace Security; | |
111 | ||
112 | #endif //_H_UTILITY_CONFIG |