lzodefs.h 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852
  1. /* lzodefs.h -- architecture, OS and compiler specific defines
  2. This file is part of the LZO real-time data compression library.
  3. Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
  4. Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
  5. Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
  6. Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
  7. Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
  8. Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
  9. Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
  10. Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
  11. Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
  12. Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
  13. Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
  14. Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
  15. Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
  16. Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
  17. Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  18. All Rights Reserved.
  19. The LZO library is free software; you can redistribute it and/or
  20. modify it under the terms of the GNU General Public License as
  21. published by the Free Software Foundation; either version 2 of
  22. the License, or (at your option) any later version.
  23. The LZO library is distributed in the hope that it will be useful,
  24. but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. GNU General Public License for more details.
  27. You should have received a copy of the GNU General Public License
  28. along with the LZO library; see the file COPYING.
  29. If not, write to the Free Software Foundation, Inc.,
  30. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  31. Markus F.X.J. Oberhumer
  32. <markus@oberhumer.com>
  33. http://www.oberhumer.com/opensource/lzo/
  34. */
  35. #ifndef __LZODEFS_H_INCLUDED
  36. #define __LZODEFS_H_INCLUDED 1
  37. #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
  38. # define __CYGWIN__ __CYGWIN32__
  39. #endif
  40. #if defined(__IBMCPP__) && !defined(__IBMC__)
  41. # define __IBMC__ __IBMCPP__
  42. #endif
  43. #if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
  44. # define __INTEL_COMPILER __ICL
  45. #endif
  46. #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
  47. # define _ALL_SOURCE 1
  48. #endif
  49. #if defined(__mips__) && defined(__R5900__)
  50. # if !defined(__LONG_MAX__)
  51. # define __LONG_MAX__ 9223372036854775807L
  52. # endif
  53. #endif
  54. #if defined(__INTEL_COMPILER) && defined(__linux__)
  55. # pragma warning(disable: 193)
  56. #endif
  57. #if defined(__KEIL__) && defined(__C166__)
  58. # pragma warning disable = 322
  59. #elif 0 && defined(__C251__)
  60. # pragma warning disable = 322
  61. #endif
  62. #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
  63. # if (_MSC_VER >= 1300)
  64. # pragma warning(disable: 4668)
  65. # endif
  66. #endif
  67. #if 0 && defined(__WATCOMC__)
  68. # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
  69. # pragma warning 203 9
  70. # endif
  71. #endif
  72. #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
  73. # pragma option -h
  74. #endif
  75. #if 0
  76. #define LZO_0xffffL 0xfffful
  77. #define LZO_0xffffffffL 0xfffffffful
  78. #else
  79. #define LZO_0xffffL 65535ul
  80. #define LZO_0xffffffffL 4294967295ul
  81. #endif
  82. #if (LZO_0xffffL == LZO_0xffffffffL)
  83. # error "your preprocessor is broken 1"
  84. #endif
  85. #if (16ul * 16384ul != 262144ul)
  86. # error "your preprocessor is broken 2"
  87. #endif
  88. #if 0
  89. #if (32767 >= 4294967295ul)
  90. # error "your preprocessor is broken 3"
  91. #endif
  92. #if (65535u >= 4294967295ul)
  93. # error "your preprocessor is broken 4"
  94. #endif
  95. #endif
  96. #if (UINT_MAX == LZO_0xffffL)
  97. #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
  98. # if !defined(MSDOS)
  99. # define MSDOS 1
  100. # endif
  101. # if !defined(_MSDOS)
  102. # define _MSDOS 1
  103. # endif
  104. #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
  105. # if (__VERSION == 520) && (MB_LEN_MAX == 1)
  106. # if !defined(__AZTEC_C__)
  107. # define __AZTEC_C__ __VERSION
  108. # endif
  109. # if !defined(__DOS__)
  110. # define __DOS__ 1
  111. # endif
  112. # endif
  113. #endif
  114. #endif
  115. #if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL)
  116. # define ptrdiff_t long
  117. # define _PTRDIFF_T_DEFINED 1
  118. #endif
  119. #if (UINT_MAX == LZO_0xffffL)
  120. # undef __LZO_RENAME_A
  121. # undef __LZO_RENAME_B
  122. # if defined(__AZTEC_C__) && defined(__DOS__)
  123. # define __LZO_RENAME_A 1
  124. # elif defined(_MSC_VER) && defined(MSDOS)
  125. # if (_MSC_VER < 600)
  126. # define __LZO_RENAME_A 1
  127. # elif (_MSC_VER < 700)
  128. # define __LZO_RENAME_B 1
  129. # endif
  130. # elif defined(__TSC__) && defined(__OS2__)
  131. # define __LZO_RENAME_A 1
  132. # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
  133. # define __LZO_RENAME_A 1
  134. # elif defined(__PACIFIC__) && defined(DOS)
  135. # if !defined(__far)
  136. # define __far far
  137. # endif
  138. # if !defined(__near)
  139. # define __near near
  140. # endif
  141. # endif
  142. # if defined(__LZO_RENAME_A)
  143. # if !defined(__cdecl)
  144. # define __cdecl cdecl
  145. # endif
  146. # if !defined(__far)
  147. # define __far far
  148. # endif
  149. # if !defined(__huge)
  150. # define __huge huge
  151. # endif
  152. # if !defined(__near)
  153. # define __near near
  154. # endif
  155. # if !defined(__pascal)
  156. # define __pascal pascal
  157. # endif
  158. # if !defined(__huge)
  159. # define __huge huge
  160. # endif
  161. # elif defined(__LZO_RENAME_B)
  162. # if !defined(__cdecl)
  163. # define __cdecl _cdecl
  164. # endif
  165. # if !defined(__far)
  166. # define __far _far
  167. # endif
  168. # if !defined(__huge)
  169. # define __huge _huge
  170. # endif
  171. # if !defined(__near)
  172. # define __near _near
  173. # endif
  174. # if !defined(__pascal)
  175. # define __pascal _pascal
  176. # endif
  177. # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
  178. # if !defined(__cdecl)
  179. # define __cdecl cdecl
  180. # endif
  181. # if !defined(__pascal)
  182. # define __pascal pascal
  183. # endif
  184. # endif
  185. # undef __LZO_RENAME_A
  186. # undef __LZO_RENAME_B
  187. #endif
  188. #if (UINT_MAX == LZO_0xffffL)
  189. #if defined(__AZTEC_C__) && defined(__DOS__)
  190. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  191. #elif defined(_MSC_VER) && defined(MSDOS)
  192. # if (_MSC_VER < 600)
  193. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  194. # endif
  195. # if (_MSC_VER < 700)
  196. # define LZO_BROKEN_INTEGRAL_PROMOTION 1
  197. # define LZO_BROKEN_SIZEOF 1
  198. # endif
  199. #elif defined(__PACIFIC__) && defined(DOS)
  200. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  201. #elif defined(__TURBOC__) && defined(__MSDOS__)
  202. # if (__TURBOC__ < 0x0150)
  203. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  204. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  205. # define LZO_BROKEN_INTEGRAL_PROMOTION 1
  206. # endif
  207. # if (__TURBOC__ < 0x0200)
  208. # define LZO_BROKEN_SIZEOF 1
  209. # endif
  210. # if (__TURBOC__ < 0x0400) && defined(__cplusplus)
  211. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  212. # endif
  213. #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
  214. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  215. # define LZO_BROKEN_SIZEOF 1
  216. #endif
  217. #endif
  218. #if defined(__WATCOMC__) && (__WATCOMC__ < 900)
  219. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  220. #endif
  221. #if defined(_CRAY) && defined(_CRAY1)
  222. # define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1
  223. #endif
  224. #define LZO_PP_STRINGIZE(x) #x
  225. #define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x)
  226. #define LZO_PP_CONCAT2(a,b) a ## b
  227. #define LZO_PP_CONCAT3(a,b,c) a ## b ## c
  228. #define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
  229. #define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
  230. #define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b)
  231. #define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c)
  232. #define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d)
  233. #define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e)
  234. #if 1
  235. #define LZO_CPP_STRINGIZE(x) #x
  236. #define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x)
  237. #define LZO_CPP_CONCAT2(a,b) a ## b
  238. #define LZO_CPP_CONCAT3(a,b,c) a ## b ## c
  239. #define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
  240. #define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
  241. #define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b)
  242. #define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c)
  243. #define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d)
  244. #define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e)
  245. #endif
  246. #define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o))
  247. #if 1 && defined(__cplusplus)
  248. # if !defined(__STDC_CONSTANT_MACROS)
  249. # define __STDC_CONSTANT_MACROS 1
  250. # endif
  251. # if !defined(__STDC_LIMIT_MACROS)
  252. # define __STDC_LIMIT_MACROS 1
  253. # endif
  254. #endif
  255. #if defined(__cplusplus)
  256. # define LZO_EXTERN_C extern "C"
  257. #else
  258. # define LZO_EXTERN_C extern
  259. #endif
  260. #if !defined(__LZO_OS_OVERRIDE)
  261. #if (LZO_OS_FREESTANDING)
  262. # define LZO_INFO_OS "freestanding"
  263. #elif (LZO_OS_EMBEDDED)
  264. # define LZO_INFO_OS "embedded"
  265. #elif 1 && defined(__IAR_SYSTEMS_ICC__)
  266. # define LZO_OS_EMBEDDED 1
  267. # define LZO_INFO_OS "embedded"
  268. #elif defined(__CYGWIN__) && defined(__GNUC__)
  269. # define LZO_OS_CYGWIN 1
  270. # define LZO_INFO_OS "cygwin"
  271. #elif defined(__EMX__) && defined(__GNUC__)
  272. # define LZO_OS_EMX 1
  273. # define LZO_INFO_OS "emx"
  274. #elif defined(__BEOS__)
  275. # define LZO_OS_BEOS 1
  276. # define LZO_INFO_OS "beos"
  277. #elif defined(__Lynx__)
  278. # define LZO_OS_LYNXOS 1
  279. # define LZO_INFO_OS "lynxos"
  280. #elif defined(__OS400__)
  281. # define LZO_OS_OS400 1
  282. # define LZO_INFO_OS "os400"
  283. #elif defined(__QNX__)
  284. # define LZO_OS_QNX 1
  285. # define LZO_INFO_OS "qnx"
  286. #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
  287. # define LZO_OS_DOS32 1
  288. # define LZO_INFO_OS "dos32"
  289. #elif defined(__BORLANDC__) && defined(__DPMI16__)
  290. # define LZO_OS_DOS16 1
  291. # define LZO_INFO_OS "dos16"
  292. #elif defined(__ZTC__) && defined(DOS386)
  293. # define LZO_OS_DOS32 1
  294. # define LZO_INFO_OS "dos32"
  295. #elif defined(__OS2__) || defined(__OS2V2__)
  296. # if (UINT_MAX == LZO_0xffffL)
  297. # define LZO_OS_OS216 1
  298. # define LZO_INFO_OS "os216"
  299. # elif (UINT_MAX == LZO_0xffffffffL)
  300. # define LZO_OS_OS2 1
  301. # define LZO_INFO_OS "os2"
  302. # else
  303. # error "check your limits.h header"
  304. # endif
  305. #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
  306. # define LZO_OS_WIN64 1
  307. # define LZO_INFO_OS "win64"
  308. #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
  309. # define LZO_OS_WIN32 1
  310. # define LZO_INFO_OS "win32"
  311. #elif defined(__MWERKS__) && defined(__INTEL__)
  312. # define LZO_OS_WIN32 1
  313. # define LZO_INFO_OS "win32"
  314. #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
  315. # if (UINT_MAX == LZO_0xffffL)
  316. # define LZO_OS_WIN16 1
  317. # define LZO_INFO_OS "win16"
  318. # elif (UINT_MAX == LZO_0xffffffffL)
  319. # define LZO_OS_WIN32 1
  320. # define LZO_INFO_OS "win32"
  321. # else
  322. # error "check your limits.h header"
  323. # endif
  324. #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
  325. # if (UINT_MAX == LZO_0xffffL)
  326. # define LZO_OS_DOS16 1
  327. # define LZO_INFO_OS "dos16"
  328. # elif (UINT_MAX == LZO_0xffffffffL)
  329. # define LZO_OS_DOS32 1
  330. # define LZO_INFO_OS "dos32"
  331. # else
  332. # error "check your limits.h header"
  333. # endif
  334. #elif defined(__WATCOMC__)
  335. # if defined(__NT__) && (UINT_MAX == LZO_0xffffL)
  336. # define LZO_OS_DOS16 1
  337. # define LZO_INFO_OS "dos16"
  338. # elif defined(__NT__) && (__WATCOMC__ < 1100)
  339. # define LZO_OS_WIN32 1
  340. # define LZO_INFO_OS "win32"
  341. # elif defined(__linux__) || defined(__LINUX__)
  342. # define LZO_OS_POSIX 1
  343. # define LZO_INFO_OS "posix"
  344. # else
  345. # error "please specify a target using the -bt compiler option"
  346. # endif
  347. #elif defined(__palmos__)
  348. # define LZO_OS_PALMOS 1
  349. # define LZO_INFO_OS "palmos"
  350. #elif defined(__TOS__) || defined(__atarist__)
  351. # define LZO_OS_TOS 1
  352. # define LZO_INFO_OS "tos"
  353. #elif defined(macintosh) && !defined(__ppc__)
  354. # define LZO_OS_MACCLASSIC 1
  355. # define LZO_INFO_OS "macclassic"
  356. #elif defined(__VMS)
  357. # define LZO_OS_VMS 1
  358. # define LZO_INFO_OS "vms"
  359. #elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
  360. # define LZO_OS_CONSOLE 1
  361. # define LZO_OS_CONSOLE_PS2 1
  362. # define LZO_INFO_OS "console"
  363. # define LZO_INFO_OS_CONSOLE "ps2"
  364. #elif (defined(__mips__) && defined(__psp__))
  365. # define LZO_OS_CONSOLE 1
  366. # define LZO_OS_CONSOLE_PSP 1
  367. # define LZO_INFO_OS "console"
  368. # define LZO_INFO_OS_CONSOLE "psp"
  369. #else
  370. # define LZO_OS_POSIX 1
  371. # define LZO_INFO_OS "posix"
  372. #endif
  373. #if (LZO_OS_POSIX)
  374. # if defined(_AIX) || defined(__AIX__) || defined(__aix__)
  375. # define LZO_OS_POSIX_AIX 1
  376. # define LZO_INFO_OS_POSIX "aix"
  377. # elif defined(__FreeBSD__)
  378. # define LZO_OS_POSIX_FREEBSD 1
  379. # define LZO_INFO_OS_POSIX "freebsd"
  380. # elif defined(__hpux__) || defined(__hpux)
  381. # define LZO_OS_POSIX_HPUX 1
  382. # define LZO_INFO_OS_POSIX "hpux"
  383. # elif defined(__INTERIX)
  384. # define LZO_OS_POSIX_INTERIX 1
  385. # define LZO_INFO_OS_POSIX "interix"
  386. # elif defined(__IRIX__) || defined(__irix__)
  387. # define LZO_OS_POSIX_IRIX 1
  388. # define LZO_INFO_OS_POSIX "irix"
  389. # elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
  390. # define LZO_OS_POSIX_LINUX 1
  391. # define LZO_INFO_OS_POSIX "linux"
  392. # elif defined(__APPLE__) || defined(__MACOS__)
  393. # define LZO_OS_POSIX_MACOSX 1
  394. # define LZO_INFO_OS_POSIX "macosx"
  395. # elif defined(__minix__) || defined(__minix)
  396. # define LZO_OS_POSIX_MINIX 1
  397. # define LZO_INFO_OS_POSIX "minix"
  398. # elif defined(__NetBSD__)
  399. # define LZO_OS_POSIX_NETBSD 1
  400. # define LZO_INFO_OS_POSIX "netbsd"
  401. # elif defined(__OpenBSD__)
  402. # define LZO_OS_POSIX_OPENBSD 1
  403. # define LZO_INFO_OS_POSIX "openbsd"
  404. # elif defined(__osf__)
  405. # define LZO_OS_POSIX_OSF 1
  406. # define LZO_INFO_OS_POSIX "osf"
  407. # elif defined(__solaris__) || defined(__sun)
  408. # if defined(__SVR4) || defined(__svr4__)
  409. # define LZO_OS_POSIX_SOLARIS 1
  410. # define LZO_INFO_OS_POSIX "solaris"
  411. # else
  412. # define LZO_OS_POSIX_SUNOS 1
  413. # define LZO_INFO_OS_POSIX "sunos"
  414. # endif
  415. # elif defined(__ultrix__) || defined(__ultrix)
  416. # define LZO_OS_POSIX_ULTRIX 1
  417. # define LZO_INFO_OS_POSIX "ultrix"
  418. # elif defined(_UNICOS)
  419. # define LZO_OS_POSIX_UNICOS 1
  420. # define LZO_INFO_OS_POSIX "unicos"
  421. # else
  422. # define LZO_OS_POSIX_UNKNOWN 1
  423. # define LZO_INFO_OS_POSIX "unknown"
  424. # endif
  425. #endif
  426. #endif
  427. #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
  428. # if (UINT_MAX != LZO_0xffffL)
  429. # error "this should not happen"
  430. # endif
  431. # if (ULONG_MAX != LZO_0xffffffffL)
  432. # error "this should not happen"
  433. # endif
  434. #endif
  435. #if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64)
  436. # if (UINT_MAX != LZO_0xffffffffL)
  437. # error "this should not happen"
  438. # endif
  439. # if (ULONG_MAX != LZO_0xffffffffL)
  440. # error "this should not happen"
  441. # endif
  442. #endif
  443. #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
  444. # define LZO_CC_CILLY 1
  445. # define LZO_INFO_CC "Cilly"
  446. # if defined(__CILLY__)
  447. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__)
  448. # else
  449. # define LZO_INFO_CCVER "unknown"
  450. # endif
  451. #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
  452. # define LZO_CC_SDCC 1
  453. # define LZO_INFO_CC "sdcc"
  454. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC)
  455. #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
  456. # define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__)
  457. # define LZO_INFO_CC "Pathscale C"
  458. # define LZO_INFO_CCVER __PATHSCALE__
  459. #elif defined(__INTEL_COMPILER)
  460. # define LZO_CC_INTELC 1
  461. # define LZO_INFO_CC "Intel C"
  462. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER)
  463. # if defined(_WIN32) || defined(_WIN64)
  464. # define LZO_CC_SYNTAX_MSC 1
  465. # else
  466. # define LZO_CC_SYNTAX_GNUC 1
  467. # endif
  468. #elif defined(__POCC__) && defined(_WIN32)
  469. # define LZO_CC_PELLESC 1
  470. # define LZO_INFO_CC "Pelles C"
  471. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__)
  472. #elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  473. # if defined(__GNUC_PATCHLEVEL__)
  474. # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
  475. # else
  476. # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
  477. # endif
  478. # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
  479. # define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__)
  480. # else
  481. # define LZO_CC_CLANG_CLANG 0x020700L
  482. # endif
  483. # define LZO_CC_CLANG LZO_CC_CLANG_GNUC
  484. # define LZO_INFO_CC "clang"
  485. # define LZO_INFO_CCVER __VERSION__
  486. #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  487. # if defined(__GNUC_PATCHLEVEL__)
  488. # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
  489. # else
  490. # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
  491. # endif
  492. # define LZO_CC_LLVM LZO_CC_LLVM_GNUC
  493. # define LZO_INFO_CC "llvm-gcc"
  494. # define LZO_INFO_CCVER __VERSION__
  495. #elif defined(__GNUC__) && defined(__VERSION__)
  496. # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
  497. # define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
  498. # elif defined(__GNUC_MINOR__)
  499. # define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
  500. # else
  501. # define LZO_CC_GNUC (__GNUC__ * 0x10000L)
  502. # endif
  503. # define LZO_INFO_CC "gcc"
  504. # define LZO_INFO_CCVER __VERSION__
  505. #elif defined(__ACK__) && defined(_ACK)
  506. # define LZO_CC_ACK 1
  507. # define LZO_INFO_CC "Amsterdam Compiler Kit C"
  508. # define LZO_INFO_CCVER "unknown"
  509. #elif defined(__AZTEC_C__)
  510. # define LZO_CC_AZTECC 1
  511. # define LZO_INFO_CC "Aztec C"
  512. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__)
  513. #elif defined(__CODEGEARC__)
  514. # define LZO_CC_CODEGEARC 1
  515. # define LZO_INFO_CC "CodeGear C"
  516. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__)
  517. #elif defined(__BORLANDC__)
  518. # define LZO_CC_BORLANDC 1
  519. # define LZO_INFO_CC "Borland C"
  520. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__)
  521. #elif defined(_CRAYC) && defined(_RELEASE)
  522. # define LZO_CC_CRAYC 1
  523. # define LZO_INFO_CC "Cray C"
  524. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE)
  525. #elif defined(__DMC__) && defined(__SC__)
  526. # define LZO_CC_DMC 1
  527. # define LZO_INFO_CC "Digital Mars C"
  528. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__)
  529. #elif defined(__DECC)
  530. # define LZO_CC_DECC 1
  531. # define LZO_INFO_CC "DEC C"
  532. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC)
  533. #elif defined(__HIGHC__)
  534. # define LZO_CC_HIGHC 1
  535. # define LZO_INFO_CC "MetaWare High C"
  536. # define LZO_INFO_CCVER "unknown"
  537. #elif defined(__IAR_SYSTEMS_ICC__)
  538. # define LZO_CC_IARC 1
  539. # define LZO_INFO_CC "IAR C"
  540. # if defined(__VER__)
  541. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__)
  542. # else
  543. # define LZO_INFO_CCVER "unknown"
  544. # endif
  545. #elif defined(__IBMC__)
  546. # define LZO_CC_IBMC 1
  547. # define LZO_INFO_CC "IBM C"
  548. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__)
  549. #elif defined(__KEIL__) && defined(__C166__)
  550. # define LZO_CC_KEILC 1
  551. # define LZO_INFO_CC "Keil C"
  552. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__)
  553. #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
  554. # define LZO_CC_LCCWIN32 1
  555. # define LZO_INFO_CC "lcc-win32"
  556. # define LZO_INFO_CCVER "unknown"
  557. #elif defined(__LCC__)
  558. # define LZO_CC_LCC 1
  559. # define LZO_INFO_CC "lcc"
  560. # if defined(__LCC_VERSION__)
  561. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__)
  562. # else
  563. # define LZO_INFO_CCVER "unknown"
  564. # endif
  565. #elif defined(_MSC_VER)
  566. # define LZO_CC_MSC 1
  567. # define LZO_INFO_CC "Microsoft C"
  568. # if defined(_MSC_FULL_VER)
  569. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER)
  570. # else
  571. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER)
  572. # endif
  573. #elif defined(__MWERKS__)
  574. # define LZO_CC_MWERKS 1
  575. # define LZO_INFO_CC "Metrowerks C"
  576. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__)
  577. #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
  578. # define LZO_CC_NDPC 1
  579. # define LZO_INFO_CC "Microway NDP C"
  580. # define LZO_INFO_CCVER "unknown"
  581. #elif defined(__PACIFIC__)
  582. # define LZO_CC_PACIFICC 1
  583. # define LZO_INFO_CC "Pacific C"
  584. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__)
  585. #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
  586. # define LZO_CC_PGI 1
  587. # define LZO_INFO_CC "Portland Group PGI C"
  588. # define LZO_INFO_CCVER "unknown"
  589. #elif defined(__PUREC__) && defined(__TOS__)
  590. # define LZO_CC_PUREC 1
  591. # define LZO_INFO_CC "Pure C"
  592. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__)
  593. #elif defined(__SC__) && defined(__ZTC__)
  594. # define LZO_CC_SYMANTECC 1
  595. # define LZO_INFO_CC "Symantec C"
  596. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__)
  597. #elif defined(__SUNPRO_C)
  598. # define LZO_INFO_CC "SunPro C"
  599. # if ((__SUNPRO_C)+0 > 0)
  600. # define LZO_CC_SUNPROC __SUNPRO_C
  601. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C)
  602. # else
  603. # define LZO_CC_SUNPROC 1
  604. # define LZO_INFO_CCVER "unknown"
  605. # endif
  606. #elif defined(__SUNPRO_CC)
  607. # define LZO_INFO_CC "SunPro C"
  608. # if ((__SUNPRO_CC)+0 > 0)
  609. # define LZO_CC_SUNPROC __SUNPRO_CC
  610. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC)
  611. # else
  612. # define LZO_CC_SUNPROC 1
  613. # define LZO_INFO_CCVER "unknown"
  614. # endif
  615. #elif defined(__TINYC__)
  616. # define LZO_CC_TINYC 1
  617. # define LZO_INFO_CC "Tiny C"
  618. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__)
  619. #elif defined(__TSC__)
  620. # define LZO_CC_TOPSPEEDC 1
  621. # define LZO_INFO_CC "TopSpeed C"
  622. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__)
  623. #elif defined(__WATCOMC__)
  624. # define LZO_CC_WATCOMC 1
  625. # define LZO_INFO_CC "Watcom C"
  626. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__)
  627. #elif defined(__TURBOC__)
  628. # define LZO_CC_TURBOC 1
  629. # define LZO_INFO_CC "Turbo C"
  630. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__)
  631. #elif defined(__ZTC__)
  632. # define LZO_CC_ZORTECHC 1
  633. # define LZO_INFO_CC "Zortech C"
  634. # if (__ZTC__ == 0x310)
  635. # define LZO_INFO_CCVER "0x310"
  636. # else
  637. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__)
  638. # endif
  639. #else
  640. # define LZO_CC_UNKNOWN 1
  641. # define LZO_INFO_CC "unknown"
  642. # define LZO_INFO_CCVER "unknown"
  643. #endif
  644. #if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
  645. # error "LZO_CC_MSC: _MSC_FULL_VER is not defined"
  646. #endif
  647. #if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY)
  648. # if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY)
  649. # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
  650. # define LZO_ARCH_CRAY_MPP 1
  651. # elif defined(_CRAY1)
  652. # define LZO_ARCH_CRAY_PVP 1
  653. # endif
  654. # endif
  655. #endif
  656. #if !defined(__LZO_ARCH_OVERRIDE)
  657. #if (LZO_ARCH_GENERIC)
  658. # define LZO_INFO_ARCH "generic"
  659. #elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
  660. # define LZO_ARCH_I086 1
  661. # define LZO_ARCH_IA16 1
  662. # define LZO_INFO_ARCH "i086"
  663. #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
  664. # define LZO_ARCH_ALPHA 1
  665. # define LZO_INFO_ARCH "alpha"
  666. #elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
  667. # define LZO_ARCH_ALPHA 1
  668. # define LZO_INFO_ARCH "alpha"
  669. #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
  670. # define LZO_ARCH_AMD64 1
  671. # define LZO_INFO_ARCH "amd64"
  672. #elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
  673. # define LZO_ARCH_ARM 1
  674. # define LZO_ARCH_ARM_THUMB 1
  675. # define LZO_INFO_ARCH "arm_thumb"
  676. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
  677. # define LZO_ARCH_ARM 1
  678. # if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1)
  679. # define LZO_ARCH_ARM_THUMB 1
  680. # define LZO_INFO_ARCH "arm_thumb"
  681. # elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2)
  682. # define LZO_INFO_ARCH "arm"
  683. # else
  684. # define LZO_INFO_ARCH "arm"
  685. # endif
  686. #elif defined(__arm__) || defined(_M_ARM)
  687. # define LZO_ARCH_ARM 1
  688. # define LZO_INFO_ARCH "arm"
  689. #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__)
  690. # define LZO_ARCH_AVR 1
  691. # define LZO_INFO_ARCH "avr"
  692. #elif defined(__avr32__) || defined(__AVR32__)
  693. # define LZO_ARCH_AVR32 1
  694. # define LZO_INFO_ARCH "avr32"
  695. #elif defined(__bfin__)
  696. # define LZO_ARCH_BLACKFIN 1
  697. # define LZO_INFO_ARCH "blackfin"
  698. #elif (UINT_MAX == LZO_0xffffL) && defined(__C166__)
  699. # define LZO_ARCH_C166 1
  700. # define LZO_INFO_ARCH "c166"
  701. #elif defined(__cris__)
  702. # define LZO_ARCH_CRIS 1
  703. # define LZO_INFO_ARCH "cris"
  704. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
  705. # define LZO_ARCH_EZ80 1
  706. # define LZO_INFO_ARCH "ez80"
  707. #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
  708. # define LZO_ARCH_H8300 1
  709. # define LZO_INFO_ARCH "h8300"
  710. #elif defined(__hppa__) || defined(__hppa)
  711. # define LZO_ARCH_HPPA 1
  712. # define LZO_INFO_ARCH "hppa"
  713. #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
  714. # define LZO_ARCH_I386 1
  715. # define LZO_ARCH_IA32 1
  716. # define LZO_INFO_ARCH "i386"
  717. #elif (LZO_CC_ZORTECHC && defined(__I86__))
  718. # define LZO_ARCH_I386 1
  719. # define LZO_ARCH_IA32 1
  720. # define LZO_INFO_ARCH "i386"
  721. #elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386)
  722. # define LZO_ARCH_I386 1
  723. # define LZO_ARCH_IA32 1
  724. # define LZO_INFO_ARCH "i386"
  725. #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
  726. # define LZO_ARCH_IA64 1
  727. # define LZO_INFO_ARCH "ia64"
  728. #elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__)
  729. # define LZO_ARCH_M16C 1
  730. # define LZO_INFO_ARCH "m16c"
  731. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
  732. # define LZO_ARCH_M16C 1
  733. # define LZO_INFO_ARCH "m16c"
  734. #elif defined(__m32r__)
  735. # define LZO_ARCH_M32R 1
  736. # define LZO_INFO_ARCH "m32r"
  737. #elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
  738. # define LZO_ARCH_M68K 1
  739. # define LZO_INFO_ARCH "m68k"
  740. #elif (UINT_MAX == LZO_0xffffL) && defined(__C251__)
  741. # define LZO_ARCH_MCS251 1
  742. # define LZO_INFO_ARCH "mcs251"
  743. #elif (UINT_MAX == LZO_0xffffL) && defined(__C51__)
  744. # define LZO_ARCH_MCS51 1
  745. # define LZO_INFO_ARCH "mcs51"
  746. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
  747. # define LZO_ARCH_MCS51 1
  748. # define LZO_INFO_ARCH "mcs51"
  749. #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
  750. # define LZO_ARCH_MIPS 1
  751. # define LZO_INFO_ARCH "mips"
  752. #elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__)
  753. # define LZO_ARCH_MSP430 1
  754. # define LZO_INFO_ARCH "msp430"
  755. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
  756. # define LZO_ARCH_MSP430 1
  757. # define LZO_INFO_ARCH "msp430"
  758. #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
  759. # define LZO_ARCH_POWERPC 1
  760. # define LZO_INFO_ARCH "powerpc"
  761. #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
  762. # define LZO_ARCH_S390 1
  763. # define LZO_INFO_ARCH "s390"
  764. #elif defined(__sh__) || defined(_M_SH)
  765. # define LZO_ARCH_SH 1
  766. # define LZO_INFO_ARCH "sh"
  767. #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
  768. # define LZO_ARCH_SPARC 1
  769. # define LZO_INFO_ARCH "sparc"
  770. #elif defined(__SPU__)
  771. # define LZO_ARCH_SPU 1
  772. # define LZO_INFO_ARCH "spu"
  773. #elif (UINT_MAX == LZO_0xffffL) && defined(__z80)
  774. # define LZO_ARCH_Z80 1
  775. # define LZO_INFO_ARCH "z80"
  776. #elif (LZO_ARCH_CRAY_PVP)
  777. # if defined(_CRAYSV1)
  778. # define LZO_ARCH_CRAY_SV1 1
  779. # define LZO_INFO_ARCH "cray_sv1"
  780. # elif (_ADDR64)
  781. # define LZO_ARCH_CRAY_T90 1
  782. # define LZO_INFO_ARCH "cray_t90"
  783. # elif (_ADDR32)
  784. # define LZO_ARCH_CRAY_YMP 1
  785. # define LZO_INFO_ARCH "cray_ymp"
  786. # else
  787. # define LZO_ARCH_CRAY_XMP 1
  788. # define LZO_INFO_ARCH "cray_xmp"
  789. # endif
  790. #else
  791. # define LZO_ARCH_UNKNOWN 1
  792. # define LZO_INFO_ARCH "unknown"
  793. #endif
  794. #endif
  795. #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2)
  796. # error "FIXME - missing define for CPU architecture"
  797. #endif
  798. #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32)
  799. # error "FIXME - missing WIN32 define for CPU architecture"
  800. #endif
  801. #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64)
  802. # error "FIXME - missing WIN64 define for CPU architecture"
  803. #endif
  804. #if (LZO_OS_OS216 || LZO_OS_WIN16)
  805. # define LZO_ARCH_I086PM 1
  806. # define LZO_ARCH_IA16PM 1
  807. #elif 1 && (LZO_OS_DOS16 && defined(BLX286))
  808. # define LZO_ARCH_I086PM 1
  809. # define LZO_ARCH_IA16PM 1
  810. #elif 1 && (LZO_OS_DOS16 && defined(DOSX286))
  811. # define LZO_ARCH_I086PM 1
  812. # define LZO_ARCH_IA16PM 1
  813. #elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__))
  814. # define LZO_ARCH_I086PM 1
  815. # define LZO_ARCH_IA16PM 1
  816. #endif
  817. #if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM)
  818. # error "this should not happen"
  819. #endif
  820. #if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086)
  821. # error "this should not happen"
  822. #endif
  823. #if (LZO_ARCH_I086)
  824. # if (UINT_MAX != LZO_0xffffL)
  825. # error "this should not happen"
  826. # endif
  827. # if (ULONG_MAX != LZO_0xffffffffL)
  828. # error "this should not happen"
  829. # endif
  830. #endif
  831. #if (LZO_ARCH_I386)
  832. # if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__)
  833. # error "this should not happen"
  834. # endif
  835. # if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__)
  836. # error "this should not happen"
  837. # endif
  838. # if (ULONG_MAX != LZO_0xffffffffL)
  839. # error "this should not happen"
  840. # endif
  841. #endif
  842. #if !defined(__LZO_MM_OVERRIDE)
  843. #if (LZO_ARCH_I086)
  844. #if (UINT_MAX != LZO_0xffffL)
  845. # error "this should not happen"
  846. #endif
  847. #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
  848. # define LZO_MM_TINY 1
  849. #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
  850. # define LZO_MM_HUGE 1
  851. #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
  852. # define LZO_MM_SMALL 1
  853. #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
  854. # define LZO_MM_MEDIUM 1
  855. #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
  856. # define LZO_MM_COMPACT 1
  857. #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
  858. # define LZO_MM_LARGE 1
  859. #elif (LZO_CC_AZTECC)
  860. # if defined(_LARGE_CODE) && defined(_LARGE_DATA)
  861. # define LZO_MM_LARGE 1
  862. # elif defined(_LARGE_CODE)
  863. # define LZO_MM_MEDIUM 1
  864. # elif defined(_LARGE_DATA)
  865. # define LZO_MM_COMPACT 1
  866. # else
  867. # define LZO_MM_SMALL 1
  868. # endif
  869. #elif (LZO_CC_ZORTECHC && defined(__VCM__))
  870. # define LZO_MM_LARGE 1
  871. #else
  872. # error "unknown memory model"
  873. #endif
  874. #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
  875. #define LZO_HAVE_MM_HUGE_PTR 1
  876. #define LZO_HAVE_MM_HUGE_ARRAY 1
  877. #if (LZO_MM_TINY)
  878. # undef LZO_HAVE_MM_HUGE_ARRAY
  879. #endif
  880. #if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC)
  881. # undef LZO_HAVE_MM_HUGE_PTR
  882. # undef LZO_HAVE_MM_HUGE_ARRAY
  883. #elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
  884. # undef LZO_HAVE_MM_HUGE_ARRAY
  885. #elif (LZO_CC_MSC && defined(_QC))
  886. # undef LZO_HAVE_MM_HUGE_ARRAY
  887. # if (_MSC_VER < 600)
  888. # undef LZO_HAVE_MM_HUGE_PTR
  889. # endif
  890. #elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295))
  891. # undef LZO_HAVE_MM_HUGE_ARRAY
  892. #endif
  893. #if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR)
  894. # if (LZO_OS_DOS16)
  895. # error "this should not happen"
  896. # elif (LZO_CC_ZORTECHC)
  897. # else
  898. # error "this should not happen"
  899. # endif
  900. #endif
  901. #ifdef __cplusplus
  902. extern "C" {
  903. #endif
  904. #if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
  905. extern void __near __cdecl _AHSHIFT(void);
  906. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  907. #elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
  908. extern void __near __cdecl _AHSHIFT(void);
  909. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  910. #elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC)
  911. extern void __near __cdecl _AHSHIFT(void);
  912. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  913. #elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295))
  914. extern void __near __cdecl _AHSHIFT(void);
  915. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  916. #elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16)
  917. # define LZO_MM_AHSHIFT 12
  918. #elif (LZO_CC_WATCOMC)
  919. extern unsigned char _HShift;
  920. # define LZO_MM_AHSHIFT ((unsigned) _HShift)
  921. #else
  922. # error "FIXME - implement LZO_MM_AHSHIFT"
  923. #endif
  924. #ifdef __cplusplus
  925. }
  926. #endif
  927. #endif
  928. #elif (LZO_ARCH_C166)
  929. #if !defined(__MODEL__)
  930. # error "FIXME - C166 __MODEL__"
  931. #elif ((__MODEL__) == 0)
  932. # define LZO_MM_SMALL 1
  933. #elif ((__MODEL__) == 1)
  934. # define LZO_MM_SMALL 1
  935. #elif ((__MODEL__) == 2)
  936. # define LZO_MM_LARGE 1
  937. #elif ((__MODEL__) == 3)
  938. # define LZO_MM_TINY 1
  939. #elif ((__MODEL__) == 4)
  940. # define LZO_MM_XTINY 1
  941. #elif ((__MODEL__) == 5)
  942. # define LZO_MM_XSMALL 1
  943. #else
  944. # error "FIXME - C166 __MODEL__"
  945. #endif
  946. #elif (LZO_ARCH_MCS251)
  947. #if !defined(__MODEL__)
  948. # error "FIXME - MCS251 __MODEL__"
  949. #elif ((__MODEL__) == 0)
  950. # define LZO_MM_SMALL 1
  951. #elif ((__MODEL__) == 2)
  952. # define LZO_MM_LARGE 1
  953. #elif ((__MODEL__) == 3)
  954. # define LZO_MM_TINY 1
  955. #elif ((__MODEL__) == 4)
  956. # define LZO_MM_XTINY 1
  957. #elif ((__MODEL__) == 5)
  958. # define LZO_MM_XSMALL 1
  959. #else
  960. # error "FIXME - MCS251 __MODEL__"
  961. #endif
  962. #elif (LZO_ARCH_MCS51)
  963. #if !defined(__MODEL__)
  964. # error "FIXME - MCS51 __MODEL__"
  965. #elif ((__MODEL__) == 1)
  966. # define LZO_MM_SMALL 1
  967. #elif ((__MODEL__) == 2)
  968. # define LZO_MM_LARGE 1
  969. #elif ((__MODEL__) == 3)
  970. # define LZO_MM_TINY 1
  971. #elif ((__MODEL__) == 4)
  972. # define LZO_MM_XTINY 1
  973. #elif ((__MODEL__) == 5)
  974. # define LZO_MM_XSMALL 1
  975. #else
  976. # error "FIXME - MCS51 __MODEL__"
  977. #endif
  978. #elif (LZO_ARCH_CRAY_PVP)
  979. # define LZO_MM_PVP 1
  980. #else
  981. # define LZO_MM_FLAT 1
  982. #endif
  983. #if (LZO_MM_COMPACT)
  984. # define LZO_INFO_MM "compact"
  985. #elif (LZO_MM_FLAT)
  986. # define LZO_INFO_MM "flat"
  987. #elif (LZO_MM_HUGE)
  988. # define LZO_INFO_MM "huge"
  989. #elif (LZO_MM_LARGE)
  990. # define LZO_INFO_MM "large"
  991. #elif (LZO_MM_MEDIUM)
  992. # define LZO_INFO_MM "medium"
  993. #elif (LZO_MM_PVP)
  994. # define LZO_INFO_MM "pvp"
  995. #elif (LZO_MM_SMALL)
  996. # define LZO_INFO_MM "small"
  997. #elif (LZO_MM_TINY)
  998. # define LZO_INFO_MM "tiny"
  999. #else
  1000. # error "unknown memory model"
  1001. #endif
  1002. #endif
  1003. #if defined(SIZEOF_SHORT)
  1004. # define LZO_SIZEOF_SHORT (SIZEOF_SHORT)
  1005. #endif
  1006. #if defined(SIZEOF_INT)
  1007. # define LZO_SIZEOF_INT (SIZEOF_INT)
  1008. #endif
  1009. #if defined(SIZEOF_LONG)
  1010. # define LZO_SIZEOF_LONG (SIZEOF_LONG)
  1011. #endif
  1012. #if defined(SIZEOF_LONG_LONG)
  1013. # define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
  1014. #endif
  1015. #if defined(SIZEOF___INT16)
  1016. # define LZO_SIZEOF___INT16 (SIZEOF___INT16)
  1017. #endif
  1018. #if defined(SIZEOF___INT32)
  1019. # define LZO_SIZEOF___INT32 (SIZEOF___INT32)
  1020. #endif
  1021. #if defined(SIZEOF___INT64)
  1022. # define LZO_SIZEOF___INT64 (SIZEOF___INT64)
  1023. #endif
  1024. #if defined(SIZEOF_VOID_P)
  1025. # define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P)
  1026. #endif
  1027. #if defined(SIZEOF_SIZE_T)
  1028. # define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
  1029. #endif
  1030. #if defined(SIZEOF_PTRDIFF_T)
  1031. # define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
  1032. #endif
  1033. #define __LZO_LSR(x,b) (((x)+0ul) >> (b))
  1034. #if !defined(LZO_SIZEOF_SHORT)
  1035. # if (LZO_ARCH_CRAY_PVP)
  1036. # define LZO_SIZEOF_SHORT 8
  1037. # elif (USHRT_MAX == LZO_0xffffL)
  1038. # define LZO_SIZEOF_SHORT 2
  1039. # elif (__LZO_LSR(USHRT_MAX,7) == 1)
  1040. # define LZO_SIZEOF_SHORT 1
  1041. # elif (__LZO_LSR(USHRT_MAX,15) == 1)
  1042. # define LZO_SIZEOF_SHORT 2
  1043. # elif (__LZO_LSR(USHRT_MAX,31) == 1)
  1044. # define LZO_SIZEOF_SHORT 4
  1045. # elif (__LZO_LSR(USHRT_MAX,63) == 1)
  1046. # define LZO_SIZEOF_SHORT 8
  1047. # elif (__LZO_LSR(USHRT_MAX,127) == 1)
  1048. # define LZO_SIZEOF_SHORT 16
  1049. # else
  1050. # error "LZO_SIZEOF_SHORT"
  1051. # endif
  1052. #endif
  1053. #if !defined(LZO_SIZEOF_INT)
  1054. # if (LZO_ARCH_CRAY_PVP)
  1055. # define LZO_SIZEOF_INT 8
  1056. # elif (UINT_MAX == LZO_0xffffL)
  1057. # define LZO_SIZEOF_INT 2
  1058. # elif (UINT_MAX == LZO_0xffffffffL)
  1059. # define LZO_SIZEOF_INT 4
  1060. # elif (__LZO_LSR(UINT_MAX,7) == 1)
  1061. # define LZO_SIZEOF_INT 1
  1062. # elif (__LZO_LSR(UINT_MAX,15) == 1)
  1063. # define LZO_SIZEOF_INT 2
  1064. # elif (__LZO_LSR(UINT_MAX,31) == 1)
  1065. # define LZO_SIZEOF_INT 4
  1066. # elif (__LZO_LSR(UINT_MAX,63) == 1)
  1067. # define LZO_SIZEOF_INT 8
  1068. # elif (__LZO_LSR(UINT_MAX,127) == 1)
  1069. # define LZO_SIZEOF_INT 16
  1070. # else
  1071. # error "LZO_SIZEOF_INT"
  1072. # endif
  1073. #endif
  1074. #if !defined(LZO_SIZEOF_LONG)
  1075. # if (ULONG_MAX == LZO_0xffffffffL)
  1076. # define LZO_SIZEOF_LONG 4
  1077. # elif (__LZO_LSR(ULONG_MAX,7) == 1)
  1078. # define LZO_SIZEOF_LONG 1
  1079. # elif (__LZO_LSR(ULONG_MAX,15) == 1)
  1080. # define LZO_SIZEOF_LONG 2
  1081. # elif (__LZO_LSR(ULONG_MAX,31) == 1)
  1082. # define LZO_SIZEOF_LONG 4
  1083. # elif (__LZO_LSR(ULONG_MAX,63) == 1)
  1084. # define LZO_SIZEOF_LONG 8
  1085. # elif (__LZO_LSR(ULONG_MAX,127) == 1)
  1086. # define LZO_SIZEOF_LONG 16
  1087. # else
  1088. # error "LZO_SIZEOF_LONG"
  1089. # endif
  1090. #endif
  1091. #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
  1092. #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
  1093. # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
  1094. # if (LZO_CC_GNUC >= 0x030300ul)
  1095. # if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0)
  1096. # define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG
  1097. # elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1)
  1098. # define LZO_SIZEOF_LONG_LONG 4
  1099. # endif
  1100. # endif
  1101. # endif
  1102. #endif
  1103. #endif
  1104. #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
  1105. #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
  1106. #if (LZO_ARCH_I086 && LZO_CC_DMC)
  1107. #elif (LZO_CC_CILLY) && defined(__GNUC__)
  1108. # define LZO_SIZEOF_LONG_LONG 8
  1109. #elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1110. # define LZO_SIZEOF_LONG_LONG 8
  1111. #elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400))
  1112. # define LZO_SIZEOF_LONG_LONG 8
  1113. #elif (LZO_OS_WIN64 || defined(_WIN64))
  1114. # define LZO_SIZEOF___INT64 8
  1115. #elif (LZO_ARCH_I386 && (LZO_CC_DMC))
  1116. # define LZO_SIZEOF_LONG_LONG 8
  1117. #elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700)))
  1118. # define LZO_SIZEOF_LONG_LONG 8
  1119. #elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__)))
  1120. # define LZO_SIZEOF_LONG_LONG 8
  1121. #elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC))
  1122. # define LZO_SIZEOF_LONG_LONG 8
  1123. #elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC))
  1124. # define LZO_SIZEOF___INT64 8
  1125. #elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC))
  1126. # define LZO_SIZEOF___INT64 8
  1127. #elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
  1128. # define LZO_SIZEOF___INT64 8
  1129. #elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100)))
  1130. # define LZO_SIZEOF___INT64 8
  1131. #elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
  1132. # define LZO_SIZEOF___INT64 8
  1133. #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
  1134. # define LZO_SIZEOF_LONG_LONG 8
  1135. #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
  1136. # define LZO_SIZEOF_LONG_LONG 8
  1137. #elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2)
  1138. #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
  1139. # define LZO_SIZEOF_LONG_LONG 8
  1140. #endif
  1141. #endif
  1142. #endif
  1143. #if defined(__cplusplus) && (LZO_CC_GNUC)
  1144. # if (LZO_CC_GNUC < 0x020800ul)
  1145. # undef LZO_SIZEOF_LONG_LONG
  1146. # endif
  1147. #endif
  1148. #if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
  1149. # undef LZO_SIZEOF_LONG_LONG
  1150. #endif
  1151. #if !defined(LZO_SIZEOF_VOID_P)
  1152. #if (LZO_ARCH_I086)
  1153. # define __LZO_WORDSIZE 2
  1154. # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM)
  1155. # define LZO_SIZEOF_VOID_P 2
  1156. # elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE)
  1157. # define LZO_SIZEOF_VOID_P 4
  1158. # else
  1159. # error "LZO_MM"
  1160. # endif
  1161. #elif (LZO_ARCH_AVR || LZO_ARCH_Z80)
  1162. # define __LZO_WORDSIZE 1
  1163. # define LZO_SIZEOF_VOID_P 2
  1164. #elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430)
  1165. # define LZO_SIZEOF_VOID_P 2
  1166. #elif (LZO_ARCH_H8300)
  1167. # if defined(__NORMAL_MODE__)
  1168. # define __LZO_WORDSIZE 4
  1169. # define LZO_SIZEOF_VOID_P 2
  1170. # elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
  1171. # define __LZO_WORDSIZE 4
  1172. # define LZO_SIZEOF_VOID_P 4
  1173. # else
  1174. # define __LZO_WORDSIZE 2
  1175. # define LZO_SIZEOF_VOID_P 2
  1176. # endif
  1177. # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4)
  1178. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT
  1179. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT
  1180. # endif
  1181. #elif (LZO_ARCH_M16C)
  1182. # define __LZO_WORDSIZE 2
  1183. # if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
  1184. # define LZO_SIZEOF_VOID_P 4
  1185. # else
  1186. # define LZO_SIZEOF_VOID_P 2
  1187. # endif
  1188. #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
  1189. # define __LZO_WORDSIZE 8
  1190. # define LZO_SIZEOF_VOID_P 4
  1191. #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
  1192. # define __LZO_WORDSIZE 8
  1193. # define LZO_SIZEOF_VOID_P 8
  1194. #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
  1195. # define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
  1196. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
  1197. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
  1198. #elif (LZO_OS_OS400 || defined(__OS400__))
  1199. # define __LZO_WORDSIZE LZO_SIZEOF_LONG
  1200. # define LZO_SIZEOF_VOID_P 16
  1201. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
  1202. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
  1203. #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
  1204. # define LZO_SIZEOF_VOID_P 8
  1205. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
  1206. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
  1207. #elif (LZO_ARCH_SPU)
  1208. # if 0
  1209. # define __LZO_WORDSIZE 16
  1210. # endif
  1211. # define LZO_SIZEOF_VOID_P 4
  1212. #else
  1213. # define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
  1214. #endif
  1215. #endif
  1216. #if !defined(LZO_WORDSIZE)
  1217. # if defined(__LZO_WORDSIZE)
  1218. # define LZO_WORDSIZE __LZO_WORDSIZE
  1219. # else
  1220. # define LZO_WORDSIZE LZO_SIZEOF_VOID_P
  1221. # endif
  1222. #endif
  1223. #if !defined(LZO_SIZEOF_SIZE_T)
  1224. #if (LZO_ARCH_I086 || LZO_ARCH_M16C)
  1225. # define LZO_SIZEOF_SIZE_T 2
  1226. #else
  1227. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P
  1228. #endif
  1229. #endif
  1230. #if !defined(LZO_SIZEOF_PTRDIFF_T)
  1231. #if (LZO_ARCH_I086)
  1232. # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE)
  1233. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P
  1234. # elif (LZO_MM_COMPACT || LZO_MM_LARGE)
  1235. # if (LZO_CC_BORLANDC || LZO_CC_TURBOC)
  1236. # define LZO_SIZEOF_PTRDIFF_T 4
  1237. # else
  1238. # define LZO_SIZEOF_PTRDIFF_T 2
  1239. # endif
  1240. # else
  1241. # error "LZO_MM"
  1242. # endif
  1243. #else
  1244. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T
  1245. #endif
  1246. #endif
  1247. #if (LZO_ABI_NEUTRAL_ENDIAN)
  1248. # undef LZO_ABI_BIG_ENDIAN
  1249. # undef LZO_ABI_LITTLE_ENDIAN
  1250. #elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN)
  1251. #if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP)
  1252. # define LZO_ABI_BIG_ENDIAN 1
  1253. #elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64)
  1254. # define LZO_ABI_LITTLE_ENDIAN 1
  1255. #elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430)
  1256. # define LZO_ABI_LITTLE_ENDIAN 1
  1257. #elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390)
  1258. # define LZO_ABI_BIG_ENDIAN 1
  1259. #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
  1260. # if (__LITTLE_ENDIAN__ == 1)
  1261. # define LZO_ABI_LITTLE_ENDIAN 1
  1262. # else
  1263. # define LZO_ABI_BIG_ENDIAN 1
  1264. # endif
  1265. #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
  1266. # define LZO_ABI_BIG_ENDIAN 1
  1267. #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
  1268. # define LZO_ABI_LITTLE_ENDIAN 1
  1269. #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
  1270. # define LZO_ABI_BIG_ENDIAN 1
  1271. #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
  1272. # define LZO_ABI_LITTLE_ENDIAN 1
  1273. #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
  1274. # define LZO_ABI_BIG_ENDIAN 1
  1275. #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
  1276. # define LZO_ABI_LITTLE_ENDIAN 1
  1277. #endif
  1278. #endif
  1279. #if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN)
  1280. # error "this should not happen"
  1281. #endif
  1282. #if (LZO_ABI_BIG_ENDIAN)
  1283. # define LZO_INFO_ABI_ENDIAN "be"
  1284. #elif (LZO_ABI_LITTLE_ENDIAN)
  1285. # define LZO_INFO_ABI_ENDIAN "le"
  1286. #elif (LZO_ABI_NEUTRAL_ENDIAN)
  1287. # define LZO_INFO_ABI_ENDIAN "neutral"
  1288. #endif
  1289. #if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
  1290. # define LZO_ABI_I8LP16 1
  1291. # define LZO_INFO_ABI_PM "i8lp16"
  1292. #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
  1293. # define LZO_ABI_ILP16 1
  1294. # define LZO_INFO_ABI_PM "ilp16"
  1295. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
  1296. # define LZO_ABI_ILP32 1
  1297. # define LZO_INFO_ABI_PM "ilp32"
  1298. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8)
  1299. # define LZO_ABI_LLP64 1
  1300. # define LZO_INFO_ABI_PM "llp64"
  1301. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
  1302. # define LZO_ABI_LP64 1
  1303. # define LZO_INFO_ABI_PM "lp64"
  1304. #elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
  1305. # define LZO_ABI_ILP64 1
  1306. # define LZO_INFO_ABI_PM "ilp64"
  1307. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4)
  1308. # define LZO_ABI_IP32L64 1
  1309. # define LZO_INFO_ABI_PM "ip32l64"
  1310. #endif
  1311. #if !defined(__LZO_LIBC_OVERRIDE)
  1312. #if (LZO_LIBC_NAKED)
  1313. # define LZO_INFO_LIBC "naked"
  1314. #elif (LZO_LIBC_FREESTANDING)
  1315. # define LZO_INFO_LIBC "freestanding"
  1316. #elif (LZO_LIBC_MOSTLY_FREESTANDING)
  1317. # define LZO_INFO_LIBC "mfreestanding"
  1318. #elif (LZO_LIBC_ISOC90)
  1319. # define LZO_INFO_LIBC "isoc90"
  1320. #elif (LZO_LIBC_ISOC99)
  1321. # define LZO_INFO_LIBC "isoc99"
  1322. #elif defined(__dietlibc__)
  1323. # define LZO_LIBC_DIETLIBC 1
  1324. # define LZO_INFO_LIBC "dietlibc"
  1325. #elif defined(_NEWLIB_VERSION)
  1326. # define LZO_LIBC_NEWLIB 1
  1327. # define LZO_INFO_LIBC "newlib"
  1328. #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
  1329. # if defined(__UCLIBC_SUBLEVEL__)
  1330. # define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__)
  1331. # else
  1332. # define LZO_LIBC_UCLIBC 0x00090bL
  1333. # endif
  1334. # define LZO_INFO_LIBC "uclibc"
  1335. #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
  1336. # define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
  1337. # define LZO_INFO_LIBC "glibc"
  1338. #elif (LZO_CC_MWERKS) && defined(__MSL__)
  1339. # define LZO_LIBC_MSL __MSL__
  1340. # define LZO_INFO_LIBC "msl"
  1341. #elif 1 && defined(__IAR_SYSTEMS_ICC__)
  1342. # define LZO_LIBC_ISOC90 1
  1343. # define LZO_INFO_LIBC "isoc90"
  1344. #else
  1345. # define LZO_LIBC_DEFAULT 1
  1346. # define LZO_INFO_LIBC "default"
  1347. #endif
  1348. #endif
  1349. #if !defined(__lzo_gnuc_extension__)
  1350. #if (LZO_CC_GNUC >= 0x020800ul)
  1351. # define __lzo_gnuc_extension__ __extension__
  1352. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1353. # define __lzo_gnuc_extension__ __extension__
  1354. #else
  1355. # define __lzo_gnuc_extension__ /*empty*/
  1356. #endif
  1357. #endif
  1358. #if !defined(__lzo_ua_volatile)
  1359. # define __lzo_ua_volatile volatile
  1360. #endif
  1361. #if !defined(__lzo_alignof)
  1362. #if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
  1363. # define __lzo_alignof(e) __alignof__(e)
  1364. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
  1365. # define __lzo_alignof(e) __alignof__(e)
  1366. #elif (LZO_CC_MSC && (_MSC_VER >= 1300))
  1367. # define __lzo_alignof(e) __alignof(e)
  1368. #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
  1369. # define __lzo_alignof(e) __alignof__(e)
  1370. #endif
  1371. #endif
  1372. #if defined(__lzo_alignof)
  1373. # define __lzo_HAVE_alignof 1
  1374. #endif
  1375. #if !defined(__lzo_constructor)
  1376. #if (LZO_CC_GNUC >= 0x030400ul)
  1377. # define __lzo_constructor __attribute__((__constructor__,__used__))
  1378. #elif (LZO_CC_GNUC >= 0x020700ul)
  1379. # define __lzo_constructor __attribute__((__constructor__))
  1380. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1381. # define __lzo_constructor __attribute__((__constructor__))
  1382. #endif
  1383. #endif
  1384. #if defined(__lzo_constructor)
  1385. # define __lzo_HAVE_constructor 1
  1386. #endif
  1387. #if !defined(__lzo_destructor)
  1388. #if (LZO_CC_GNUC >= 0x030400ul)
  1389. # define __lzo_destructor __attribute__((__destructor__,__used__))
  1390. #elif (LZO_CC_GNUC >= 0x020700ul)
  1391. # define __lzo_destructor __attribute__((__destructor__))
  1392. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1393. # define __lzo_destructor __attribute__((__destructor__))
  1394. #endif
  1395. #endif
  1396. #if defined(__lzo_destructor)
  1397. # define __lzo_HAVE_destructor 1
  1398. #endif
  1399. #if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor)
  1400. # error "this should not happen"
  1401. #endif
  1402. #if !defined(__lzo_inline)
  1403. #if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295))
  1404. #elif defined(__cplusplus)
  1405. # define __lzo_inline inline
  1406. #elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
  1407. # define __lzo_inline __inline
  1408. #elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
  1409. # define __lzo_inline __inline__
  1410. #elif (LZO_CC_DMC)
  1411. # define __lzo_inline __inline
  1412. #elif (LZO_CC_INTELC)
  1413. # define __lzo_inline __inline
  1414. #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405))
  1415. # define __lzo_inline __inline
  1416. #elif (LZO_CC_MSC && (_MSC_VER >= 900))
  1417. # define __lzo_inline __inline
  1418. #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
  1419. # define __lzo_inline __inline__
  1420. #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
  1421. # define __lzo_inline inline
  1422. #endif
  1423. #endif
  1424. #if defined(__lzo_inline)
  1425. # define __lzo_HAVE_inline 1
  1426. #else
  1427. # define __lzo_inline /*empty*/
  1428. #endif
  1429. #if !defined(__lzo_forceinline)
  1430. #if (LZO_CC_GNUC >= 0x030200ul)
  1431. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1432. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
  1433. # define __lzo_forceinline __forceinline
  1434. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
  1435. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1436. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1437. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1438. #elif (LZO_CC_MSC && (_MSC_VER >= 1200))
  1439. # define __lzo_forceinline __forceinline
  1440. #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
  1441. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1442. #endif
  1443. #endif
  1444. #if defined(__lzo_forceinline)
  1445. # define __lzo_HAVE_forceinline 1
  1446. #else
  1447. # define __lzo_forceinline /*empty*/
  1448. #endif
  1449. #if !defined(__lzo_noinline)
  1450. #if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
  1451. # define __lzo_noinline __attribute__((__noinline__,__used__))
  1452. #elif (LZO_CC_GNUC >= 0x030200ul)
  1453. # define __lzo_noinline __attribute__((__noinline__))
  1454. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC)
  1455. # define __lzo_noinline __declspec(noinline)
  1456. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
  1457. # define __lzo_noinline __attribute__((__noinline__))
  1458. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1459. # define __lzo_noinline __attribute__((__noinline__))
  1460. #elif (LZO_CC_MSC && (_MSC_VER >= 1300))
  1461. # define __lzo_noinline __declspec(noinline)
  1462. #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64))
  1463. # if defined(__cplusplus)
  1464. # else
  1465. # define __lzo_noinline __declspec(noinline)
  1466. # endif
  1467. #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100))
  1468. # define __lzo_noinline __attribute__((__noinline__))
  1469. #endif
  1470. #endif
  1471. #if defined(__lzo_noinline)
  1472. # define __lzo_HAVE_noinline 1
  1473. #else
  1474. # define __lzo_noinline /*empty*/
  1475. #endif
  1476. #if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline)
  1477. # error "this should not happen"
  1478. #endif
  1479. #if !defined(__lzo_noreturn)
  1480. #if (LZO_CC_GNUC >= 0x020700ul)
  1481. # define __lzo_noreturn __attribute__((__noreturn__))
  1482. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
  1483. # define __lzo_noreturn __declspec(noreturn)
  1484. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
  1485. # define __lzo_noreturn __attribute__((__noreturn__))
  1486. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1487. # define __lzo_noreturn __attribute__((__noreturn__))
  1488. #elif (LZO_CC_MSC && (_MSC_VER >= 1200))
  1489. # define __lzo_noreturn __declspec(noreturn)
  1490. #endif
  1491. #endif
  1492. #if defined(__lzo_noreturn)
  1493. # define __lzo_HAVE_noreturn 1
  1494. #else
  1495. # define __lzo_noreturn /*empty*/
  1496. #endif
  1497. #if !defined(__lzo_nothrow)
  1498. #if (LZO_CC_GNUC >= 0x030300ul)
  1499. # define __lzo_nothrow __attribute__((__nothrow__))
  1500. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus)
  1501. # define __lzo_nothrow __declspec(nothrow)
  1502. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC)
  1503. # define __lzo_nothrow __attribute__((__nothrow__))
  1504. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1505. # define __lzo_nothrow __attribute__((__nothrow__))
  1506. #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
  1507. # define __lzo_nothrow __declspec(nothrow)
  1508. #endif
  1509. #endif
  1510. #if defined(__lzo_nothrow)
  1511. # define __lzo_HAVE_nothrow 1
  1512. #else
  1513. # define __lzo_nothrow /*empty*/
  1514. #endif
  1515. #if !defined(__lzo_restrict)
  1516. #if (LZO_CC_GNUC >= 0x030400ul)
  1517. # define __lzo_restrict __restrict__
  1518. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
  1519. # define __lzo_restrict __restrict__
  1520. #elif (LZO_CC_CLANG || LZO_CC_LLVM)
  1521. # define __lzo_restrict __restrict__
  1522. #elif (LZO_CC_MSC && (_MSC_VER >= 1400))
  1523. # define __lzo_restrict __restrict
  1524. #endif
  1525. #endif
  1526. #if defined(__lzo_restrict)
  1527. # define __lzo_HAVE_restrict 1
  1528. #else
  1529. # define __lzo_restrict /*empty*/
  1530. #endif
  1531. #if !defined(__lzo_likely) && !defined(__lzo_unlikely)
  1532. #if (LZO_CC_GNUC >= 0x030200ul)
  1533. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1534. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1535. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800))
  1536. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1537. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1538. #elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1539. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1540. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1541. #endif
  1542. #endif
  1543. #if defined(__lzo_likely)
  1544. # define __lzo_HAVE_likely 1
  1545. #else
  1546. # define __lzo_likely(e) (e)
  1547. #endif
  1548. #if defined(__lzo_unlikely)
  1549. # define __lzo_HAVE_unlikely 1
  1550. #else
  1551. # define __lzo_unlikely(e) (e)
  1552. #endif
  1553. #if !defined(LZO_UNUSED)
  1554. # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
  1555. # define LZO_UNUSED(var) ((void) &var)
  1556. # elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC)
  1557. # define LZO_UNUSED(var) if (&var) ; else
  1558. # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1559. # define LZO_UNUSED(var) ((void) var)
  1560. # elif (LZO_CC_MSC && (_MSC_VER < 900))
  1561. # define LZO_UNUSED(var) if (&var) ; else
  1562. # elif (LZO_CC_KEILC)
  1563. # define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];}
  1564. # elif (LZO_CC_PACIFICC)
  1565. # define LZO_UNUSED(var) ((void) sizeof(var))
  1566. # elif (LZO_CC_WATCOMC) && defined(__cplusplus)
  1567. # define LZO_UNUSED(var) ((void) var)
  1568. # else
  1569. # define LZO_UNUSED(var) ((void) &var)
  1570. # endif
  1571. #endif
  1572. #if !defined(LZO_UNUSED_FUNC)
  1573. # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
  1574. # define LZO_UNUSED_FUNC(func) ((void) func)
  1575. # elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC)
  1576. # define LZO_UNUSED_FUNC(func) if (func) ; else
  1577. # elif (LZO_CC_CLANG || LZO_CC_LLVM)
  1578. # define LZO_UNUSED_FUNC(func) ((void) &func)
  1579. # elif (LZO_CC_MSC && (_MSC_VER < 900))
  1580. # define LZO_UNUSED_FUNC(func) if (func) ; else
  1581. # elif (LZO_CC_MSC)
  1582. # define LZO_UNUSED_FUNC(func) ((void) &func)
  1583. # elif (LZO_CC_KEILC || LZO_CC_PELLESC)
  1584. # define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];}
  1585. # else
  1586. # define LZO_UNUSED_FUNC(func) ((void) func)
  1587. # endif
  1588. #endif
  1589. #if !defined(LZO_UNUSED_LABEL)
  1590. # if (LZO_CC_WATCOMC) && defined(__cplusplus)
  1591. # define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
  1592. # elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC)
  1593. # define LZO_UNUSED_LABEL(l) if (0) goto l
  1594. # else
  1595. # define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
  1596. # endif
  1597. #endif
  1598. #if !defined(LZO_DEFINE_UNINITIALIZED_VAR)
  1599. # if 0
  1600. # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
  1601. # elif 0 && (LZO_CC_GNUC)
  1602. # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
  1603. # else
  1604. # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
  1605. # endif
  1606. #endif
  1607. #if !defined(LZO_UNCONST_CAST)
  1608. # if 0 && defined(__cplusplus)
  1609. # define LZO_UNCONST_CAST(t,e) (const_cast<t> (e))
  1610. # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1611. # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e))))))
  1612. # else
  1613. # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e)))))
  1614. # endif
  1615. #endif
  1616. #if !defined(LZO_COMPILE_TIME_ASSERT_HEADER)
  1617. # if (LZO_CC_AZTECC || LZO_CC_ZORTECHC)
  1618. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
  1619. # elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
  1620. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)];
  1621. # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
  1622. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
  1623. # else
  1624. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)];
  1625. # endif
  1626. #endif
  1627. #if !defined(LZO_COMPILE_TIME_ASSERT)
  1628. # if (LZO_CC_AZTECC)
  1629. # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];}
  1630. # elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
  1631. # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
  1632. # elif (LZO_CC_MSC && (_MSC_VER < 900))
  1633. # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
  1634. # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
  1635. # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
  1636. # else
  1637. # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];}
  1638. # endif
  1639. #endif
  1640. #if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64)
  1641. # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC)
  1642. # elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
  1643. # define __lzo_cdecl __cdecl
  1644. # define __lzo_cdecl_atexit /*empty*/
  1645. # define __lzo_cdecl_main __cdecl
  1646. # if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
  1647. # define __lzo_cdecl_qsort __pascal
  1648. # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
  1649. # define __lzo_cdecl_qsort _stdcall
  1650. # else
  1651. # define __lzo_cdecl_qsort __cdecl
  1652. # endif
  1653. # elif (LZO_CC_WATCOMC)
  1654. # define __lzo_cdecl __cdecl
  1655. # else
  1656. # define __lzo_cdecl __cdecl
  1657. # define __lzo_cdecl_atexit __cdecl
  1658. # define __lzo_cdecl_main __cdecl
  1659. # define __lzo_cdecl_qsort __cdecl
  1660. # endif
  1661. # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC)
  1662. # elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
  1663. # define __lzo_cdecl_sighandler __pascal
  1664. # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
  1665. # define __lzo_cdecl_sighandler _stdcall
  1666. # elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
  1667. # define __lzo_cdecl_sighandler __clrcall
  1668. # elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
  1669. # if defined(_DLL)
  1670. # define __lzo_cdecl_sighandler _far _cdecl _loadds
  1671. # elif defined(_MT)
  1672. # define __lzo_cdecl_sighandler _far _cdecl
  1673. # else
  1674. # define __lzo_cdecl_sighandler _cdecl
  1675. # endif
  1676. # else
  1677. # define __lzo_cdecl_sighandler __cdecl
  1678. # endif
  1679. #elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC)
  1680. # define __lzo_cdecl __cdecl
  1681. #elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC))
  1682. # define __lzo_cdecl cdecl
  1683. #endif
  1684. #if !defined(__lzo_cdecl)
  1685. # define __lzo_cdecl /*empty*/
  1686. #endif
  1687. #if !defined(__lzo_cdecl_atexit)
  1688. # define __lzo_cdecl_atexit /*empty*/
  1689. #endif
  1690. #if !defined(__lzo_cdecl_main)
  1691. # define __lzo_cdecl_main /*empty*/
  1692. #endif
  1693. #if !defined(__lzo_cdecl_qsort)
  1694. # define __lzo_cdecl_qsort /*empty*/
  1695. #endif
  1696. #if !defined(__lzo_cdecl_sighandler)
  1697. # define __lzo_cdecl_sighandler /*empty*/
  1698. #endif
  1699. #if !defined(__lzo_cdecl_va)
  1700. # define __lzo_cdecl_va __lzo_cdecl
  1701. #endif
  1702. #if !(LZO_CFG_NO_WINDOWS_H)
  1703. #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64)
  1704. # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000))
  1705. # elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__)
  1706. # elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul)))
  1707. # else
  1708. # define LZO_HAVE_WINDOWS_H 1
  1709. # endif
  1710. #endif
  1711. #endif
  1712. #if (LZO_ARCH_ALPHA)
  1713. # define LZO_OPT_AVOID_UINT_INDEX 1
  1714. # define LZO_OPT_AVOID_SHORT 1
  1715. # define LZO_OPT_AVOID_USHORT 1
  1716. #elif (LZO_ARCH_AMD64)
  1717. # define LZO_OPT_AVOID_INT_INDEX 1
  1718. # define LZO_OPT_AVOID_UINT_INDEX 1
  1719. # define LZO_OPT_UNALIGNED16 1
  1720. # define LZO_OPT_UNALIGNED32 1
  1721. # define LZO_OPT_UNALIGNED64 1
  1722. #elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB)
  1723. #elif (LZO_ARCH_ARM)
  1724. # define LZO_OPT_AVOID_SHORT 1
  1725. # define LZO_OPT_AVOID_USHORT 1
  1726. #elif (LZO_ARCH_CRIS)
  1727. # define LZO_OPT_UNALIGNED16 1
  1728. # define LZO_OPT_UNALIGNED32 1
  1729. #elif (LZO_ARCH_I386)
  1730. # define LZO_OPT_UNALIGNED16 1
  1731. # define LZO_OPT_UNALIGNED32 1
  1732. #elif (LZO_ARCH_IA64)
  1733. # define LZO_OPT_AVOID_INT_INDEX 1
  1734. # define LZO_OPT_AVOID_UINT_INDEX 1
  1735. # define LZO_OPT_PREFER_POSTINC 1
  1736. #elif (LZO_ARCH_M68K)
  1737. # define LZO_OPT_PREFER_POSTINC 1
  1738. # define LZO_OPT_PREFER_PREDEC 1
  1739. # if defined(__mc68020__) && !defined(__mcoldfire__)
  1740. # define LZO_OPT_UNALIGNED16 1
  1741. # define LZO_OPT_UNALIGNED32 1
  1742. # endif
  1743. #elif (LZO_ARCH_MIPS)
  1744. # define LZO_OPT_AVOID_UINT_INDEX 1
  1745. #elif (LZO_ARCH_POWERPC)
  1746. # define LZO_OPT_PREFER_PREINC 1
  1747. # define LZO_OPT_PREFER_PREDEC 1
  1748. # if (LZO_ABI_BIG_ENDIAN)
  1749. # define LZO_OPT_UNALIGNED16 1
  1750. # define LZO_OPT_UNALIGNED32 1
  1751. # endif
  1752. #elif (LZO_ARCH_S390)
  1753. # define LZO_OPT_UNALIGNED16 1
  1754. # define LZO_OPT_UNALIGNED32 1
  1755. # if (LZO_SIZEOF_SIZE_T == 8)
  1756. # define LZO_OPT_UNALIGNED64 1
  1757. # endif
  1758. #elif (LZO_ARCH_SH)
  1759. # define LZO_OPT_PREFER_POSTINC 1
  1760. # define LZO_OPT_PREFER_PREDEC 1
  1761. #endif
  1762. #ifndef LZO_CFG_NO_INLINE_ASM
  1763. #if (LZO_CC_LLVM)
  1764. # define LZO_CFG_NO_INLINE_ASM 1
  1765. #endif
  1766. #endif
  1767. #ifndef LZO_CFG_NO_UNALIGNED
  1768. #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC)
  1769. # define LZO_CFG_NO_UNALIGNED 1
  1770. #endif
  1771. #endif
  1772. #if (LZO_CFG_NO_UNALIGNED)
  1773. # undef LZO_OPT_UNALIGNED16
  1774. # undef LZO_OPT_UNALIGNED32
  1775. # undef LZO_OPT_UNALIGNED64
  1776. #endif
  1777. #if (LZO_CFG_NO_INLINE_ASM)
  1778. #elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
  1779. # define LZO_ASM_SYNTAX_MSC 1
  1780. #elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
  1781. #elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul))
  1782. #elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
  1783. # define LZO_ASM_SYNTAX_GNUC 1
  1784. #elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
  1785. # define LZO_ASM_SYNTAX_GNUC 1
  1786. #endif
  1787. #if (LZO_ASM_SYNTAX_GNUC)
  1788. #if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul))
  1789. # define __LZO_ASM_CLOBBER "ax"
  1790. #elif (LZO_CC_INTELC)
  1791. # define __LZO_ASM_CLOBBER "memory"
  1792. #else
  1793. # define __LZO_ASM_CLOBBER "cc", "memory"
  1794. #endif
  1795. #endif
  1796. #if defined(__LZO_INFOSTR_MM)
  1797. #elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM))
  1798. # define __LZO_INFOSTR_MM ""
  1799. #elif defined(LZO_INFO_MM)
  1800. # define __LZO_INFOSTR_MM "." LZO_INFO_MM
  1801. #else
  1802. # define __LZO_INFOSTR_MM ""
  1803. #endif
  1804. #if defined(__LZO_INFOSTR_PM)
  1805. #elif defined(LZO_INFO_ABI_PM)
  1806. # define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM
  1807. #else
  1808. # define __LZO_INFOSTR_PM ""
  1809. #endif
  1810. #if defined(__LZO_INFOSTR_ENDIAN)
  1811. #elif defined(LZO_INFO_ABI_ENDIAN)
  1812. # define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN
  1813. #else
  1814. # define __LZO_INFOSTR_ENDIAN ""
  1815. #endif
  1816. #if defined(__LZO_INFOSTR_OSNAME)
  1817. #elif defined(LZO_INFO_OS_CONSOLE)
  1818. # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE
  1819. #elif defined(LZO_INFO_OS_POSIX)
  1820. # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX
  1821. #else
  1822. # define __LZO_INFOSTR_OSNAME LZO_INFO_OS
  1823. #endif
  1824. #if defined(__LZO_INFOSTR_LIBC)
  1825. #elif defined(LZO_INFO_LIBC)
  1826. # define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC
  1827. #else
  1828. # define __LZO_INFOSTR_LIBC ""
  1829. #endif
  1830. #if defined(__LZO_INFOSTR_CCVER)
  1831. #elif defined(LZO_INFO_CCVER)
  1832. # define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER
  1833. #else
  1834. # define __LZO_INFOSTR_CCVER ""
  1835. #endif
  1836. #define LZO_INFO_STRING \
  1837. LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \
  1838. " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER
  1839. #endif /* already included */
  1840. /* vim:set ts=4 et: */