cssmconfig.pas 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. {
  2. * Copyright (c) 2000-2001,2003-2004,2007 Apple Inc. All Rights Reserved.
  3. *
  4. * @APPLE_LICENSE_HEADER_START@
  5. *
  6. * This file contains Original Code and/or Modifications of Original Code
  7. * as defined in and that are subject to the Apple Public Source License
  8. * Version 2.0 (the 'License'). You may not use this file except in
  9. * compliance with the License. Please obtain a copy of the License at
  10. * http://www.opensource.apple.com/apsl/ and read it before using this
  11. * file.
  12. *
  13. * The Original Code and all software distributed under the License are
  14. * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  15. * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  16. * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  18. * Please see the License for the specific language governing rights and
  19. * limitations under the License.
  20. *
  21. * @APPLE_LICENSE_HEADER_END@
  22. *
  23. * cssmconfig.h -- Platform specific defines and typedefs for cdsa.
  24. }
  25. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, September 2010 }
  26. { Pascal Translation Update: Jonas Maebe <[email protected]>, October 2012 }
  27. { Pascal Translation Update: Jonas Maebe <[email protected]>, August 2015 }
  28. {
  29. Modified for use with Free Pascal
  30. Version 308
  31. Please report any bugs to <[email protected]>
  32. }
  33. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  34. {$mode macpas}
  35. {$modeswitch cblocks}
  36. {$packenum 1}
  37. {$macro on}
  38. {$inline on}
  39. {$calling mwpascal}
  40. unit cssmconfig;
  41. interface
  42. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  43. {$setc GAP_INTERFACES_VERSION := $0308}
  44. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  45. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  46. {$endc}
  47. {$ifc defined CPUPOWERPC and defined CPUI386}
  48. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  49. {$endc}
  50. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  51. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  52. {$endc}
  53. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  54. {$setc __ppc__ := 1}
  55. {$elsec}
  56. {$setc __ppc__ := 0}
  57. {$endc}
  58. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  59. {$setc __ppc64__ := 1}
  60. {$elsec}
  61. {$setc __ppc64__ := 0}
  62. {$endc}
  63. {$ifc not defined __i386__ and defined CPUI386}
  64. {$setc __i386__ := 1}
  65. {$elsec}
  66. {$setc __i386__ := 0}
  67. {$endc}
  68. {$ifc not defined __x86_64__ and defined CPUX86_64}
  69. {$setc __x86_64__ := 1}
  70. {$elsec}
  71. {$setc __x86_64__ := 0}
  72. {$endc}
  73. {$ifc not defined __arm__ and defined CPUARM}
  74. {$setc __arm__ := 1}
  75. {$elsec}
  76. {$setc __arm__ := 0}
  77. {$endc}
  78. {$ifc not defined __arm64__ and defined CPUAARCH64}
  79. {$setc __arm64__ := 1}
  80. {$elsec}
  81. {$setc __arm64__ := 0}
  82. {$endc}
  83. {$ifc defined cpu64}
  84. {$setc __LP64__ := 1}
  85. {$elsec}
  86. {$setc __LP64__ := 0}
  87. {$endc}
  88. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  89. {$error Conflicting definitions for __ppc__ and __i386__}
  90. {$endc}
  91. {$ifc defined __ppc__ and __ppc__}
  92. {$setc TARGET_CPU_PPC := TRUE}
  93. {$setc TARGET_CPU_PPC64 := FALSE}
  94. {$setc TARGET_CPU_X86 := FALSE}
  95. {$setc TARGET_CPU_X86_64 := FALSE}
  96. {$setc TARGET_CPU_ARM := FALSE}
  97. {$setc TARGET_CPU_ARM64 := FALSE}
  98. {$setc TARGET_OS_MAC := TRUE}
  99. {$setc TARGET_OS_IPHONE := FALSE}
  100. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  101. {$setc TARGET_OS_EMBEDDED := FALSE}
  102. {$elifc defined __ppc64__ and __ppc64__}
  103. {$setc TARGET_CPU_PPC := FALSE}
  104. {$setc TARGET_CPU_PPC64 := TRUE}
  105. {$setc TARGET_CPU_X86 := FALSE}
  106. {$setc TARGET_CPU_X86_64 := FALSE}
  107. {$setc TARGET_CPU_ARM := FALSE}
  108. {$setc TARGET_CPU_ARM64 := FALSE}
  109. {$setc TARGET_OS_MAC := TRUE}
  110. {$setc TARGET_OS_IPHONE := FALSE}
  111. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  112. {$setc TARGET_OS_EMBEDDED := FALSE}
  113. {$elifc defined __i386__ and __i386__}
  114. {$setc TARGET_CPU_PPC := FALSE}
  115. {$setc TARGET_CPU_PPC64 := FALSE}
  116. {$setc TARGET_CPU_X86 := TRUE}
  117. {$setc TARGET_CPU_X86_64 := FALSE}
  118. {$setc TARGET_CPU_ARM := FALSE}
  119. {$setc TARGET_CPU_ARM64 := FALSE}
  120. {$ifc defined(iphonesim)}
  121. {$setc TARGET_OS_MAC := FALSE}
  122. {$setc TARGET_OS_IPHONE := TRUE}
  123. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  124. {$elsec}
  125. {$setc TARGET_OS_MAC := TRUE}
  126. {$setc TARGET_OS_IPHONE := FALSE}
  127. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  128. {$endc}
  129. {$setc TARGET_OS_EMBEDDED := FALSE}
  130. {$elifc defined __x86_64__ and __x86_64__}
  131. {$setc TARGET_CPU_PPC := FALSE}
  132. {$setc TARGET_CPU_PPC64 := FALSE}
  133. {$setc TARGET_CPU_X86 := FALSE}
  134. {$setc TARGET_CPU_X86_64 := TRUE}
  135. {$setc TARGET_CPU_ARM := FALSE}
  136. {$setc TARGET_CPU_ARM64 := FALSE}
  137. {$ifc defined(iphonesim)}
  138. {$setc TARGET_OS_MAC := FALSE}
  139. {$setc TARGET_OS_IPHONE := TRUE}
  140. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  141. {$elsec}
  142. {$setc TARGET_OS_MAC := TRUE}
  143. {$setc TARGET_OS_IPHONE := FALSE}
  144. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  145. {$endc}
  146. {$setc TARGET_OS_EMBEDDED := FALSE}
  147. {$elifc defined __arm__ and __arm__}
  148. {$setc TARGET_CPU_PPC := FALSE}
  149. {$setc TARGET_CPU_PPC64 := FALSE}
  150. {$setc TARGET_CPU_X86 := FALSE}
  151. {$setc TARGET_CPU_X86_64 := FALSE}
  152. {$setc TARGET_CPU_ARM := TRUE}
  153. {$setc TARGET_CPU_ARM64 := FALSE}
  154. { will require compiler define when/if other Apple devices with ARM cpus ship }
  155. {$setc TARGET_OS_MAC := FALSE}
  156. {$setc TARGET_OS_IPHONE := TRUE}
  157. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  158. {$setc TARGET_OS_EMBEDDED := TRUE}
  159. {$elifc defined __arm64__ and __arm64__}
  160. {$setc TARGET_CPU_PPC := FALSE}
  161. {$setc TARGET_CPU_PPC64 := FALSE}
  162. {$setc TARGET_CPU_X86 := FALSE}
  163. {$setc TARGET_CPU_X86_64 := FALSE}
  164. {$setc TARGET_CPU_ARM := FALSE}
  165. {$setc TARGET_CPU_ARM64 := TRUE}
  166. { will require compiler define when/if other Apple devices with ARM cpus ship }
  167. {$setc TARGET_OS_MAC := FALSE}
  168. {$setc TARGET_OS_IPHONE := TRUE}
  169. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  170. {$setc TARGET_OS_EMBEDDED := TRUE}
  171. {$elsec}
  172. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  173. {$endc}
  174. {$ifc defined __LP64__ and __LP64__ }
  175. {$setc TARGET_CPU_64 := TRUE}
  176. {$elsec}
  177. {$setc TARGET_CPU_64 := FALSE}
  178. {$endc}
  179. {$ifc defined FPC_BIG_ENDIAN}
  180. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  181. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  182. {$elifc defined FPC_LITTLE_ENDIAN}
  183. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  184. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  185. {$elsec}
  186. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  187. {$endc}
  188. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  189. {$setc CALL_NOT_IN_CARBON := FALSE}
  190. {$setc OLDROUTINENAMES := FALSE}
  191. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  192. {$setc OPAQUE_UPP_TYPES := TRUE}
  193. {$setc OTCARBONAPPLICATION := TRUE}
  194. {$setc OTKERNEL := FALSE}
  195. {$setc PM_USE_SESSION_APIS := TRUE}
  196. {$setc TARGET_API_MAC_CARBON := TRUE}
  197. {$setc TARGET_API_MAC_OS8 := FALSE}
  198. {$setc TARGET_API_MAC_OSX := TRUE}
  199. {$setc TARGET_CARBON := TRUE}
  200. {$setc TARGET_CPU_68K := FALSE}
  201. {$setc TARGET_CPU_MIPS := FALSE}
  202. {$setc TARGET_CPU_SPARC := FALSE}
  203. {$setc TARGET_OS_UNIX := FALSE}
  204. {$setc TARGET_OS_WIN32 := FALSE}
  205. {$setc TARGET_RT_MAC_68881 := FALSE}
  206. {$setc TARGET_RT_MAC_CFM := FALSE}
  207. {$setc TARGET_RT_MAC_MACHO := TRUE}
  208. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  209. {$setc TYPE_BOOL := FALSE}
  210. {$setc TYPE_EXTENDED := FALSE}
  211. {$setc TYPE_LONGLONG := TRUE}
  212. uses MacTypes;
  213. {$endc} {not MACOSALLINCLUDE}
  214. {$ifc TARGET_OS_MAC}
  215. type
  216. CSSM_INTPTR = MacPtrSInt;
  217. CSSM_SIZE = size_t;
  218. {$endc} {TARGET_OS_MAC}
  219. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  220. end.
  221. {$endc} {not MACOSALLINCLUDE}