lzodefs.h 124 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269
  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) 1996-2017 Markus Franz Xaver Johannes Oberhumer
  4. All Rights Reserved.
  5. The LZO library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of
  8. the License, or (at your option) any later version.
  9. The LZO library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with the LZO library; see the file COPYING.
  15. If not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. Markus F.X.J. Oberhumer
  18. <markus@oberhumer.com>
  19. http://www.oberhumer.com/opensource/lzo/
  20. */
  21. #ifndef __LZODEFS_H_INCLUDED
  22. #define __LZODEFS_H_INCLUDED 1
  23. #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
  24. # define __CYGWIN__ __CYGWIN32__
  25. #endif
  26. #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
  27. # define _ALL_SOURCE 1
  28. #endif
  29. #if defined(__mips__) && defined(__R5900__)
  30. # if !defined(__LONG_MAX__)
  31. # define __LONG_MAX__ 9223372036854775807L
  32. # endif
  33. #endif
  34. #if 0
  35. #elif !defined(__LZO_LANG_OVERRIDE)
  36. #if (defined(__clang__) || defined(__GNUC__)) && defined(__ASSEMBLER__)
  37. # if (__ASSEMBLER__+0) <= 0
  38. # error "__ASSEMBLER__"
  39. # else
  40. # define LZO_LANG_ASSEMBLER 1
  41. # endif
  42. #elif defined(__cplusplus)
  43. # if (__cplusplus+0) <= 0
  44. # error "__cplusplus"
  45. # elif (__cplusplus < 199711L)
  46. # define LZO_LANG_CXX 1
  47. # elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1
  48. # define LZO_LANG_CXX _MSVC_LANG
  49. # else
  50. # define LZO_LANG_CXX __cplusplus
  51. # endif
  52. # define LZO_LANG_CPLUSPLUS LZO_LANG_CXX
  53. #else
  54. # if defined(__STDC_VERSION__) && (__STDC_VERSION__+0 >= 199409L)
  55. # define LZO_LANG_C __STDC_VERSION__
  56. # else
  57. # define LZO_LANG_C 1
  58. # endif
  59. #endif
  60. #endif
  61. #if !defined(LZO_CFG_NO_DISABLE_WUNDEF)
  62. #if defined(__ARMCC_VERSION)
  63. # pragma diag_suppress 193
  64. #elif defined(__clang__) && defined(__clang_minor__)
  65. # pragma clang diagnostic ignored "-Wundef"
  66. #elif defined(__INTEL_COMPILER)
  67. # pragma warning(disable: 193)
  68. #elif defined(__KEIL__) && defined(__C166__)
  69. # pragma warning disable = 322
  70. #elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__)
  71. # if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2))
  72. # pragma GCC diagnostic ignored "-Wundef"
  73. # endif
  74. #elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
  75. # if ((_MSC_VER-0) >= 1300)
  76. # pragma warning(disable: 4668)
  77. # endif
  78. #endif
  79. #endif
  80. #if 0 && defined(__POCC__) && defined(_WIN32)
  81. # if (__POCC__ >= 400)
  82. # pragma warn(disable: 2216)
  83. # endif
  84. #endif
  85. #if 0 && defined(__WATCOMC__)
  86. # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
  87. # pragma warning 203 9
  88. # endif
  89. #endif
  90. #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
  91. # pragma option -h
  92. #endif
  93. #if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC)
  94. #ifndef _CRT_NONSTDC_NO_DEPRECATE
  95. #define _CRT_NONSTDC_NO_DEPRECATE 1
  96. #endif
  97. #ifndef _CRT_NONSTDC_NO_WARNINGS
  98. #define _CRT_NONSTDC_NO_WARNINGS 1
  99. #endif
  100. #ifndef _CRT_SECURE_NO_DEPRECATE
  101. #define _CRT_SECURE_NO_DEPRECATE 1
  102. #endif
  103. #ifndef _CRT_SECURE_NO_WARNINGS
  104. #define _CRT_SECURE_NO_WARNINGS 1
  105. #endif
  106. #endif
  107. #if 0
  108. #define LZO_0xffffUL 0xfffful
  109. #define LZO_0xffffffffUL 0xfffffffful
  110. #else
  111. #define LZO_0xffffUL 65535ul
  112. #define LZO_0xffffffffUL 4294967295ul
  113. #endif
  114. #define LZO_0xffffL LZO_0xffffUL
  115. #define LZO_0xffffffffL LZO_0xffffffffUL
  116. #if (LZO_0xffffL == LZO_0xffffffffL)
  117. # error "your preprocessor is broken 1"
  118. #endif
  119. #if (16ul * 16384ul != 262144ul)
  120. # error "your preprocessor is broken 2"
  121. #endif
  122. #if 0
  123. #if (32767 >= 4294967295ul)
  124. # error "your preprocessor is broken 3"
  125. #endif
  126. #if (65535u >= 4294967295ul)
  127. # error "your preprocessor is broken 4"
  128. #endif
  129. #endif
  130. #if defined(__COUNTER__)
  131. # ifndef LZO_CFG_USE_COUNTER
  132. # define LZO_CFG_USE_COUNTER 1
  133. # endif
  134. #else
  135. # undef LZO_CFG_USE_COUNTER
  136. #endif
  137. #if (UINT_MAX == LZO_0xffffL)
  138. #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
  139. # if !defined(MSDOS)
  140. # define MSDOS 1
  141. # endif
  142. # if !defined(_MSDOS)
  143. # define _MSDOS 1
  144. # endif
  145. #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
  146. # if (__VERSION == 520) && (MB_LEN_MAX == 1)
  147. # if !defined(__AZTEC_C__)
  148. # define __AZTEC_C__ __VERSION
  149. # endif
  150. # if !defined(__DOS__)
  151. # define __DOS__ 1
  152. # endif
  153. # endif
  154. #endif
  155. #endif
  156. #if (UINT_MAX == LZO_0xffffL)
  157. #if defined(_MSC_VER) && defined(M_I86HM)
  158. # define ptrdiff_t long
  159. # define _PTRDIFF_T_DEFINED 1
  160. #endif
  161. #endif
  162. #if (UINT_MAX == LZO_0xffffL)
  163. # undef __LZO_RENAME_A
  164. # undef __LZO_RENAME_B
  165. # if defined(__AZTEC_C__) && defined(__DOS__)
  166. # define __LZO_RENAME_A 1
  167. # elif defined(_MSC_VER) && defined(MSDOS)
  168. # if (_MSC_VER < 600)
  169. # define __LZO_RENAME_A 1
  170. # elif (_MSC_VER < 700)
  171. # define __LZO_RENAME_B 1
  172. # endif
  173. # elif defined(__TSC__) && defined(__OS2__)
  174. # define __LZO_RENAME_A 1
  175. # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
  176. # define __LZO_RENAME_A 1
  177. # elif defined(__PACIFIC__) && defined(DOS)
  178. # if !defined(__far)
  179. # define __far far
  180. # endif
  181. # if !defined(__near)
  182. # define __near near
  183. # endif
  184. # endif
  185. # if defined(__LZO_RENAME_A)
  186. # if !defined(__cdecl)
  187. # define __cdecl cdecl
  188. # endif
  189. # if !defined(__far)
  190. # define __far far
  191. # endif
  192. # if !defined(__huge)
  193. # define __huge huge
  194. # endif
  195. # if !defined(__near)
  196. # define __near near
  197. # endif
  198. # if !defined(__pascal)
  199. # define __pascal pascal
  200. # endif
  201. # if !defined(__huge)
  202. # define __huge huge
  203. # endif
  204. # elif defined(__LZO_RENAME_B)
  205. # if !defined(__cdecl)
  206. # define __cdecl _cdecl
  207. # endif
  208. # if !defined(__far)
  209. # define __far _far
  210. # endif
  211. # if !defined(__huge)
  212. # define __huge _huge
  213. # endif
  214. # if !defined(__near)
  215. # define __near _near
  216. # endif
  217. # if !defined(__pascal)
  218. # define __pascal _pascal
  219. # endif
  220. # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
  221. # if !defined(__cdecl)
  222. # define __cdecl cdecl
  223. # endif
  224. # if !defined(__pascal)
  225. # define __pascal pascal
  226. # endif
  227. # endif
  228. # undef __LZO_RENAME_A
  229. # undef __LZO_RENAME_B
  230. #endif
  231. #if (UINT_MAX == LZO_0xffffL)
  232. #if defined(__AZTEC_C__) && defined(__DOS__)
  233. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  234. #elif defined(_MSC_VER) && defined(MSDOS)
  235. # if (_MSC_VER < 600)
  236. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  237. # endif
  238. # if (_MSC_VER < 700)
  239. # define LZO_BROKEN_INTEGRAL_PROMOTION 1
  240. # define LZO_BROKEN_SIZEOF 1
  241. # endif
  242. #elif defined(__PACIFIC__) && defined(DOS)
  243. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  244. #elif defined(__TURBOC__) && defined(__MSDOS__)
  245. # if (__TURBOC__ < 0x0150)
  246. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  247. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  248. # define LZO_BROKEN_INTEGRAL_PROMOTION 1
  249. # endif
  250. # if (__TURBOC__ < 0x0200)
  251. # define LZO_BROKEN_SIZEOF 1
  252. # endif
  253. # if (__TURBOC__ < 0x0400) && defined(__cplusplus)
  254. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  255. # endif
  256. #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
  257. # define LZO_BROKEN_CDECL_ALT_SYNTAX 1
  258. # define LZO_BROKEN_SIZEOF 1
  259. #endif
  260. #endif
  261. #if defined(__WATCOMC__) && (__WATCOMC__ < 900)
  262. # define LZO_BROKEN_INTEGRAL_CONSTANTS 1
  263. #endif
  264. #if defined(_CRAY) && defined(_CRAY1)
  265. # define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1
  266. #endif
  267. #define LZO_PP_STRINGIZE(x) #x
  268. #define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x)
  269. #define LZO_PP_CONCAT0() /*empty*/
  270. #define LZO_PP_CONCAT1(a) a
  271. #define LZO_PP_CONCAT2(a,b) a ## b
  272. #define LZO_PP_CONCAT3(a,b,c) a ## b ## c
  273. #define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
  274. #define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
  275. #define LZO_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f
  276. #define LZO_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g
  277. #define LZO_PP_ECONCAT0() LZO_PP_CONCAT0()
  278. #define LZO_PP_ECONCAT1(a) LZO_PP_CONCAT1(a)
  279. #define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b)
  280. #define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c)
  281. #define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d)
  282. #define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e)
  283. #define LZO_PP_ECONCAT6(a,b,c,d,e,f) LZO_PP_CONCAT6(a,b,c,d,e,f)
  284. #define LZO_PP_ECONCAT7(a,b,c,d,e,f,g) LZO_PP_CONCAT7(a,b,c,d,e,f,g)
  285. #define LZO_PP_EMPTY /*empty*/
  286. #define LZO_PP_EMPTY0() /*empty*/
  287. #define LZO_PP_EMPTY1(a) /*empty*/
  288. #define LZO_PP_EMPTY2(a,b) /*empty*/
  289. #define LZO_PP_EMPTY3(a,b,c) /*empty*/
  290. #define LZO_PP_EMPTY4(a,b,c,d) /*empty*/
  291. #define LZO_PP_EMPTY5(a,b,c,d,e) /*empty*/
  292. #define LZO_PP_EMPTY6(a,b,c,d,e,f) /*empty*/
  293. #define LZO_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/
  294. #if 1
  295. #define LZO_CPP_STRINGIZE(x) #x
  296. #define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x)
  297. #define LZO_CPP_CONCAT2(a,b) a ## b
  298. #define LZO_CPP_CONCAT3(a,b,c) a ## b ## c
  299. #define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
  300. #define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
  301. #define LZO_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f
  302. #define LZO_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g
  303. #define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b)
  304. #define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c)
  305. #define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d)
  306. #define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e)
  307. #define LZO_CPP_ECONCAT6(a,b,c,d,e,f) LZO_CPP_CONCAT6(a,b,c,d,e,f)
  308. #define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g)
  309. #endif
  310. #define __LZO_MASK_GEN(o,b) (((((o) << ((b)-((b)!=0))) - (o)) << 1) + (o)*((b)!=0))
  311. #if 1 && defined(__cplusplus)
  312. # if !defined(__STDC_CONSTANT_MACROS)
  313. # define __STDC_CONSTANT_MACROS 1
  314. # endif
  315. # if !defined(__STDC_LIMIT_MACROS)
  316. # define __STDC_LIMIT_MACROS 1
  317. # endif
  318. #endif
  319. #if defined(__cplusplus)
  320. # define LZO_EXTERN_C extern "C"
  321. # define LZO_EXTERN_C_BEGIN extern "C" {
  322. # define LZO_EXTERN_C_END }
  323. #else
  324. # define LZO_EXTERN_C extern
  325. # define LZO_EXTERN_C_BEGIN /*empty*/
  326. # define LZO_EXTERN_C_END /*empty*/
  327. #endif
  328. #if !defined(__LZO_OS_OVERRIDE)
  329. #if (LZO_OS_FREESTANDING)
  330. # define LZO_INFO_OS "freestanding"
  331. #elif (LZO_OS_EMBEDDED)
  332. # define LZO_INFO_OS "embedded"
  333. #elif 1 && defined(__IAR_SYSTEMS_ICC__)
  334. # define LZO_OS_EMBEDDED 1
  335. # define LZO_INFO_OS "embedded"
  336. #elif defined(__CYGWIN__) && defined(__GNUC__)
  337. # define LZO_OS_CYGWIN 1
  338. # define LZO_INFO_OS "cygwin"
  339. #elif defined(__EMX__) && defined(__GNUC__)
  340. # define LZO_OS_EMX 1
  341. # define LZO_INFO_OS "emx"
  342. #elif defined(__BEOS__)
  343. # define LZO_OS_BEOS 1
  344. # define LZO_INFO_OS "beos"
  345. #elif defined(__Lynx__)
  346. # define LZO_OS_LYNXOS 1
  347. # define LZO_INFO_OS "lynxos"
  348. #elif defined(__OS400__)
  349. # define LZO_OS_OS400 1
  350. # define LZO_INFO_OS "os400"
  351. #elif defined(__QNX__)
  352. # define LZO_OS_QNX 1
  353. # define LZO_INFO_OS "qnx"
  354. #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
  355. # define LZO_OS_DOS32 1
  356. # define LZO_INFO_OS "dos32"
  357. #elif defined(__BORLANDC__) && defined(__DPMI16__)
  358. # define LZO_OS_DOS16 1
  359. # define LZO_INFO_OS "dos16"
  360. #elif defined(__ZTC__) && defined(DOS386)
  361. # define LZO_OS_DOS32 1
  362. # define LZO_INFO_OS "dos32"
  363. #elif defined(__OS2__) || defined(__OS2V2__)
  364. # if (UINT_MAX == LZO_0xffffL)
  365. # define LZO_OS_OS216 1
  366. # define LZO_INFO_OS "os216"
  367. # elif (UINT_MAX == LZO_0xffffffffL)
  368. # define LZO_OS_OS2 1
  369. # define LZO_INFO_OS "os2"
  370. # else
  371. # error "check your limits.h header"
  372. # endif
  373. #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
  374. # define LZO_OS_WIN64 1
  375. # define LZO_INFO_OS "win64"
  376. #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
  377. # define LZO_OS_WIN32 1
  378. # define LZO_INFO_OS "win32"
  379. #elif defined(__MWERKS__) && defined(__INTEL__)
  380. # define LZO_OS_WIN32 1
  381. # define LZO_INFO_OS "win32"
  382. #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
  383. # if (UINT_MAX == LZO_0xffffL)
  384. # define LZO_OS_WIN16 1
  385. # define LZO_INFO_OS "win16"
  386. # elif (UINT_MAX == LZO_0xffffffffL)
  387. # define LZO_OS_WIN32 1
  388. # define LZO_INFO_OS "win32"
  389. # else
  390. # error "check your limits.h header"
  391. # endif
  392. #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
  393. # if (UINT_MAX == LZO_0xffffL)
  394. # define LZO_OS_DOS16 1
  395. # define LZO_INFO_OS "dos16"
  396. # elif (UINT_MAX == LZO_0xffffffffL)
  397. # define LZO_OS_DOS32 1
  398. # define LZO_INFO_OS "dos32"
  399. # else
  400. # error "check your limits.h header"
  401. # endif
  402. #elif defined(__WATCOMC__)
  403. # if defined(__NT__) && (UINT_MAX == LZO_0xffffL)
  404. # define LZO_OS_DOS16 1
  405. # define LZO_INFO_OS "dos16"
  406. # elif defined(__NT__) && (__WATCOMC__ < 1100)
  407. # define LZO_OS_WIN32 1
  408. # define LZO_INFO_OS "win32"
  409. # elif defined(__linux__) || defined(__LINUX__)
  410. # define LZO_OS_POSIX 1
  411. # define LZO_INFO_OS "posix"
  412. # else
  413. # error "please specify a target using the -bt compiler option"
  414. # endif
  415. #elif defined(__palmos__)
  416. # define LZO_OS_PALMOS 1
  417. # define LZO_INFO_OS "palmos"
  418. #elif defined(__TOS__) || defined(__atarist__)
  419. # define LZO_OS_TOS 1
  420. # define LZO_INFO_OS "tos"
  421. #elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__)
  422. # define LZO_OS_MACCLASSIC 1
  423. # define LZO_INFO_OS "macclassic"
  424. #elif defined(__VMS)
  425. # define LZO_OS_VMS 1
  426. # define LZO_INFO_OS "vms"
  427. #elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)
  428. # define LZO_OS_CONSOLE 1
  429. # define LZO_OS_CONSOLE_PS2 1
  430. # define LZO_INFO_OS "console"
  431. # define LZO_INFO_OS_CONSOLE "ps2"
  432. #elif defined(__mips__) && defined(__psp__)
  433. # define LZO_OS_CONSOLE 1
  434. # define LZO_OS_CONSOLE_PSP 1
  435. # define LZO_INFO_OS "console"
  436. # define LZO_INFO_OS_CONSOLE "psp"
  437. #else
  438. # define LZO_OS_POSIX 1
  439. # define LZO_INFO_OS "posix"
  440. #endif
  441. #if (LZO_OS_POSIX)
  442. # if defined(_AIX) || defined(__AIX__) || defined(__aix__)
  443. # define LZO_OS_POSIX_AIX 1
  444. # define LZO_INFO_OS_POSIX "aix"
  445. # elif defined(__FreeBSD__)
  446. # define LZO_OS_POSIX_FREEBSD 1
  447. # define LZO_INFO_OS_POSIX "freebsd"
  448. # elif defined(__hpux__) || defined(__hpux)
  449. # define LZO_OS_POSIX_HPUX 1
  450. # define LZO_INFO_OS_POSIX "hpux"
  451. # elif defined(__INTERIX)
  452. # define LZO_OS_POSIX_INTERIX 1
  453. # define LZO_INFO_OS_POSIX "interix"
  454. # elif defined(__IRIX__) || defined(__irix__)
  455. # define LZO_OS_POSIX_IRIX 1
  456. # define LZO_INFO_OS_POSIX "irix"
  457. # elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
  458. # define LZO_OS_POSIX_LINUX 1
  459. # define LZO_INFO_OS_POSIX "linux"
  460. # elif defined(__APPLE__) && defined(__MACH__)
  461. # if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000)
  462. # define LZO_OS_POSIX_DARWIN 1040
  463. # define LZO_INFO_OS_POSIX "darwin_iphone"
  464. # elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040)
  465. # define LZO_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
  466. # define LZO_INFO_OS_POSIX "darwin"
  467. # else
  468. # define LZO_OS_POSIX_DARWIN 1
  469. # define LZO_INFO_OS_POSIX "darwin"
  470. # endif
  471. # define LZO_OS_POSIX_MACOSX LZO_OS_POSIX_DARWIN
  472. # elif defined(__minix__) || defined(__minix)
  473. # define LZO_OS_POSIX_MINIX 1
  474. # define LZO_INFO_OS_POSIX "minix"
  475. # elif defined(__NetBSD__)
  476. # define LZO_OS_POSIX_NETBSD 1
  477. # define LZO_INFO_OS_POSIX "netbsd"
  478. # elif defined(__OpenBSD__)
  479. # define LZO_OS_POSIX_OPENBSD 1
  480. # define LZO_INFO_OS_POSIX "openbsd"
  481. # elif defined(__osf__)
  482. # define LZO_OS_POSIX_OSF 1
  483. # define LZO_INFO_OS_POSIX "osf"
  484. # elif defined(__solaris__) || defined(__sun)
  485. # if defined(__SVR4) || defined(__svr4__)
  486. # define LZO_OS_POSIX_SOLARIS 1
  487. # define LZO_INFO_OS_POSIX "solaris"
  488. # else
  489. # define LZO_OS_POSIX_SUNOS 1
  490. # define LZO_INFO_OS_POSIX "sunos"
  491. # endif
  492. # elif defined(__ultrix__) || defined(__ultrix)
  493. # define LZO_OS_POSIX_ULTRIX 1
  494. # define LZO_INFO_OS_POSIX "ultrix"
  495. # elif defined(_UNICOS)
  496. # define LZO_OS_POSIX_UNICOS 1
  497. # define LZO_INFO_OS_POSIX "unicos"
  498. # else
  499. # define LZO_OS_POSIX_UNKNOWN 1
  500. # define LZO_INFO_OS_POSIX "unknown"
  501. # endif
  502. #endif
  503. #endif
  504. #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
  505. # if (UINT_MAX != LZO_0xffffL)
  506. # error "unexpected configuration - check your compiler defines"
  507. # endif
  508. # if (ULONG_MAX != LZO_0xffffffffL)
  509. # error "unexpected configuration - check your compiler defines"
  510. # endif
  511. #endif
  512. #if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64)
  513. # if (UINT_MAX != LZO_0xffffffffL)
  514. # error "unexpected configuration - check your compiler defines"
  515. # endif
  516. # if (ULONG_MAX != LZO_0xffffffffL)
  517. # error "unexpected configuration - check your compiler defines"
  518. # endif
  519. #endif
  520. #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
  521. # define LZO_CC_CILLY 1
  522. # define LZO_INFO_CC "Cilly"
  523. # if defined(__CILLY__)
  524. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__)
  525. # else
  526. # define LZO_INFO_CCVER "unknown"
  527. # endif
  528. #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
  529. # define LZO_CC_SDCC 1
  530. # define LZO_INFO_CC "sdcc"
  531. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC)
  532. #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
  533. # define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0))
  534. # define LZO_INFO_CC "Pathscale C"
  535. # define LZO_INFO_CCVER __PATHSCALE__
  536. # if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  537. # define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  538. # endif
  539. #elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0)
  540. # define LZO_CC_INTELC __INTEL_COMPILER
  541. # define LZO_INFO_CC "Intel C"
  542. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER)
  543. # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
  544. # define LZO_CC_INTELC_MSC _MSC_VER
  545. # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  546. # define LZO_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  547. # endif
  548. #elif defined(__POCC__) && defined(_WIN32)
  549. # define LZO_CC_PELLESC 1
  550. # define LZO_INFO_CC "Pelles C"
  551. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__)
  552. #elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  553. # if defined(__GNUC_PATCHLEVEL__)
  554. # define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  555. # else
  556. # define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
  557. # endif
  558. # define LZO_CC_ARMCC __ARMCC_VERSION
  559. # define LZO_INFO_CC "ARM C Compiler"
  560. # define LZO_INFO_CCVER __VERSION__
  561. #elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER)
  562. # define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
  563. # define LZO_CC_CLANG_C2 _MSC_VER
  564. # define LZO_CC_CLANG_VENDOR_MICROSOFT 1
  565. # define LZO_INFO_CC "clang/c2"
  566. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__c2_version__)
  567. #elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__)
  568. # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
  569. # define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
  570. # else
  571. # define LZO_CC_CLANG 0x010000L
  572. # endif
  573. # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
  574. # define LZO_CC_CLANG_MSC _MSC_VER
  575. # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  576. # define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  577. # endif
  578. # if defined(__APPLE_CC__)
  579. # define LZO_CC_CLANG_VENDOR_APPLE 1
  580. # define LZO_INFO_CC "clang/apple"
  581. # else
  582. # define LZO_CC_CLANG_VENDOR_LLVM 1
  583. # define LZO_INFO_CC "clang"
  584. # endif
  585. # if defined(__clang_version__)
  586. # define LZO_INFO_CCVER __clang_version__
  587. # else
  588. # define LZO_INFO_CCVER __VERSION__
  589. # endif
  590. #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  591. # if defined(__GNUC_PATCHLEVEL__)
  592. # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  593. # else
  594. # define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
  595. # endif
  596. # define LZO_CC_LLVM LZO_CC_LLVM_GNUC
  597. # define LZO_INFO_CC "llvm-gcc"
  598. # define LZO_INFO_CCVER __VERSION__
  599. #elif defined(__ACK__) && defined(_ACK)
  600. # define LZO_CC_ACK 1
  601. # define LZO_INFO_CC "Amsterdam Compiler Kit C"
  602. # define LZO_INFO_CCVER "unknown"
  603. #elif defined(__ARMCC_VERSION) && !defined(__GNUC__)
  604. # define LZO_CC_ARMCC __ARMCC_VERSION
  605. # define LZO_CC_ARMCC_ARMCC __ARMCC_VERSION
  606. # define LZO_INFO_CC "ARM C Compiler"
  607. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ARMCC_VERSION)
  608. #elif defined(__AZTEC_C__)
  609. # define LZO_CC_AZTECC 1
  610. # define LZO_INFO_CC "Aztec C"
  611. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__)
  612. #elif defined(__CODEGEARC__)
  613. # define LZO_CC_CODEGEARC 1
  614. # define LZO_INFO_CC "CodeGear C"
  615. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__)
  616. #elif defined(__BORLANDC__)
  617. # define LZO_CC_BORLANDC 1
  618. # define LZO_INFO_CC "Borland C"
  619. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__)
  620. #elif defined(_CRAYC) && defined(_RELEASE)
  621. # define LZO_CC_CRAYC 1
  622. # define LZO_INFO_CC "Cray C"
  623. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE)
  624. #elif defined(__DMC__) && defined(__SC__)
  625. # define LZO_CC_DMC 1
  626. # define LZO_INFO_CC "Digital Mars C"
  627. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__)
  628. #elif defined(__DECC)
  629. # define LZO_CC_DECC 1
  630. # define LZO_INFO_CC "DEC C"
  631. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC)
  632. #elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0)
  633. # define LZO_CC_GHS 1
  634. # define LZO_INFO_CC "Green Hills C"
  635. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER)
  636. # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
  637. # define LZO_CC_GHS_MSC _MSC_VER
  638. # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
  639. # define LZO_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  640. # endif
  641. #elif defined(__HIGHC__)
  642. # define LZO_CC_HIGHC 1
  643. # define LZO_INFO_CC "MetaWare High C"
  644. # define LZO_INFO_CCVER "unknown"
  645. #elif defined(__HP_aCC) && ((__HP_aCC-0) > 0)
  646. # define LZO_CC_HPACC __HP_aCC
  647. # define LZO_INFO_CC "HP aCC"
  648. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__HP_aCC)
  649. #elif defined(__IAR_SYSTEMS_ICC__)
  650. # define LZO_CC_IARC 1
  651. # define LZO_INFO_CC "IAR C"
  652. # if defined(__VER__)
  653. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__)
  654. # else
  655. # define LZO_INFO_CCVER "unknown"
  656. # endif
  657. #elif defined(__IBMC__) && ((__IBMC__-0) > 0)
  658. # define LZO_CC_IBMC __IBMC__
  659. # define LZO_INFO_CC "IBM C"
  660. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__)
  661. #elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0)
  662. # define LZO_CC_IBMC __IBMCPP__
  663. # define LZO_INFO_CC "IBM C"
  664. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMCPP__)
  665. #elif defined(__KEIL__) && defined(__C166__)
  666. # define LZO_CC_KEILC 1
  667. # define LZO_INFO_CC "Keil C"
  668. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__)
  669. #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
  670. # define LZO_CC_LCCWIN32 1
  671. # define LZO_INFO_CC "lcc-win32"
  672. # define LZO_INFO_CCVER "unknown"
  673. #elif defined(__LCC__)
  674. # define LZO_CC_LCC 1
  675. # define LZO_INFO_CC "lcc"
  676. # if defined(__LCC_VERSION__)
  677. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__)
  678. # else
  679. # define LZO_INFO_CCVER "unknown"
  680. # endif
  681. #elif defined(__MWERKS__) && ((__MWERKS__-0) > 0)
  682. # define LZO_CC_MWERKS __MWERKS__
  683. # define LZO_INFO_CC "Metrowerks C"
  684. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__)
  685. #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
  686. # define LZO_CC_NDPC 1
  687. # define LZO_INFO_CC "Microway NDP C"
  688. # define LZO_INFO_CCVER "unknown"
  689. #elif defined(__PACIFIC__)
  690. # define LZO_CC_PACIFICC 1
  691. # define LZO_INFO_CC "Pacific C"
  692. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__)
  693. #elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__)
  694. # if defined(__PGIC_PATCHLEVEL__)
  695. # define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0))
  696. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__)
  697. # else
  698. # define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100)
  699. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0"
  700. # endif
  701. # define LZO_INFO_CC "Portland Group PGI C"
  702. #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
  703. # define LZO_CC_PGI 1
  704. # define LZO_INFO_CC "Portland Group PGI C"
  705. # define LZO_INFO_CCVER "unknown"
  706. #elif defined(__PUREC__) && defined(__TOS__)
  707. # define LZO_CC_PUREC 1
  708. # define LZO_INFO_CC "Pure C"
  709. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__)
  710. #elif defined(__SC__) && defined(__ZTC__)
  711. # define LZO_CC_SYMANTECC 1
  712. # define LZO_INFO_CC "Symantec C"
  713. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__)
  714. #elif defined(__SUNPRO_C)
  715. # define LZO_INFO_CC "SunPro C"
  716. # if ((__SUNPRO_C-0) > 0)
  717. # define LZO_CC_SUNPROC __SUNPRO_C
  718. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C)
  719. # else
  720. # define LZO_CC_SUNPROC 1
  721. # define LZO_INFO_CCVER "unknown"
  722. # endif
  723. #elif defined(__SUNPRO_CC)
  724. # define LZO_INFO_CC "SunPro C"
  725. # if ((__SUNPRO_CC-0) > 0)
  726. # define LZO_CC_SUNPROC __SUNPRO_CC
  727. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC)
  728. # else
  729. # define LZO_CC_SUNPROC 1
  730. # define LZO_INFO_CCVER "unknown"
  731. # endif
  732. #elif defined(__TINYC__)
  733. # define LZO_CC_TINYC 1
  734. # define LZO_INFO_CC "Tiny C"
  735. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__)
  736. #elif defined(__TSC__)
  737. # define LZO_CC_TOPSPEEDC 1
  738. # define LZO_INFO_CC "TopSpeed C"
  739. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__)
  740. #elif defined(__WATCOMC__)
  741. # define LZO_CC_WATCOMC 1
  742. # define LZO_INFO_CC "Watcom C"
  743. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__)
  744. #elif defined(__TURBOC__)
  745. # define LZO_CC_TURBOC 1
  746. # define LZO_INFO_CC "Turbo C"
  747. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__)
  748. #elif defined(__ZTC__)
  749. # define LZO_CC_ZORTECHC 1
  750. # define LZO_INFO_CC "Zortech C"
  751. # if ((__ZTC__-0) == 0x310)
  752. # define LZO_INFO_CCVER "0x310"
  753. # else
  754. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__)
  755. # endif
  756. #elif defined(__GNUC__) && defined(__VERSION__)
  757. # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
  758. # define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
  759. # elif defined(__GNUC_MINOR__)
  760. # define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
  761. # else
  762. # define LZO_CC_GNUC (__GNUC__ * 0x10000L)
  763. # endif
  764. # define LZO_INFO_CC "gcc"
  765. # define LZO_INFO_CCVER __VERSION__
  766. #elif defined(_MSC_VER) && ((_MSC_VER-0) > 0)
  767. # define LZO_CC_MSC _MSC_VER
  768. # define LZO_INFO_CC "Microsoft C"
  769. # if defined(_MSC_FULL_VER)
  770. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER)
  771. # else
  772. # define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER)
  773. # endif
  774. #else
  775. # define LZO_CC_UNKNOWN 1
  776. # define LZO_INFO_CC "unknown"
  777. # define LZO_INFO_CCVER "unknown"
  778. #endif
  779. #if (LZO_CC_GNUC) && defined(__OPEN64__)
  780. # if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__)
  781. # define LZO_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0))
  782. # define LZO_CC_OPEN64_GNUC LZO_CC_GNUC
  783. # endif
  784. #endif
  785. #if (LZO_CC_GNUC) && defined(__PCC__)
  786. # if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__)
  787. # define LZO_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0))
  788. # define LZO_CC_PCC_GNUC LZO_CC_GNUC
  789. # endif
  790. #endif
  791. #if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
  792. # error "LZO_CC_MSC: _MSC_FULL_VER is not defined"
  793. #endif
  794. #if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY)
  795. # if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY)
  796. # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
  797. # define LZO_ARCH_CRAY_MPP 1
  798. # elif defined(_CRAY1)
  799. # define LZO_ARCH_CRAY_PVP 1
  800. # endif
  801. # endif
  802. #endif
  803. #if !defined(__LZO_ARCH_OVERRIDE)
  804. #if (LZO_ARCH_GENERIC)
  805. # define LZO_INFO_ARCH "generic"
  806. #elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
  807. # define LZO_ARCH_I086 1
  808. # define LZO_INFO_ARCH "i086"
  809. #elif defined(__aarch64__) || defined(_M_ARM64)
  810. # define LZO_ARCH_ARM64 1
  811. # define LZO_INFO_ARCH "arm64"
  812. #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
  813. # define LZO_ARCH_ALPHA 1
  814. # define LZO_INFO_ARCH "alpha"
  815. #elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
  816. # define LZO_ARCH_ALPHA 1
  817. # define LZO_INFO_ARCH "alpha"
  818. #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
  819. # define LZO_ARCH_AMD64 1
  820. # define LZO_INFO_ARCH "amd64"
  821. #elif defined(__arm__) || defined(_M_ARM)
  822. # define LZO_ARCH_ARM 1
  823. # define LZO_INFO_ARCH "arm"
  824. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
  825. # define LZO_ARCH_ARM 1
  826. # define LZO_INFO_ARCH "arm"
  827. #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__)
  828. # define LZO_ARCH_AVR 1
  829. # define LZO_INFO_ARCH "avr"
  830. #elif defined(__avr32__) || defined(__AVR32__)
  831. # define LZO_ARCH_AVR32 1
  832. # define LZO_INFO_ARCH "avr32"
  833. #elif defined(__bfin__)
  834. # define LZO_ARCH_BLACKFIN 1
  835. # define LZO_INFO_ARCH "blackfin"
  836. #elif (UINT_MAX == LZO_0xffffL) && defined(__C166__)
  837. # define LZO_ARCH_C166 1
  838. # define LZO_INFO_ARCH "c166"
  839. #elif defined(__cris__)
  840. # define LZO_ARCH_CRIS 1
  841. # define LZO_INFO_ARCH "cris"
  842. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
  843. # define LZO_ARCH_EZ80 1
  844. # define LZO_INFO_ARCH "ez80"
  845. #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
  846. # define LZO_ARCH_H8300 1
  847. # define LZO_INFO_ARCH "h8300"
  848. #elif defined(__hppa__) || defined(__hppa)
  849. # define LZO_ARCH_HPPA 1
  850. # define LZO_INFO_ARCH "hppa"
  851. #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
  852. # define LZO_ARCH_I386 1
  853. # define LZO_ARCH_IA32 1
  854. # define LZO_INFO_ARCH "i386"
  855. #elif (LZO_CC_ZORTECHC && defined(__I86__))
  856. # define LZO_ARCH_I386 1
  857. # define LZO_ARCH_IA32 1
  858. # define LZO_INFO_ARCH "i386"
  859. #elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386)
  860. # define LZO_ARCH_I386 1
  861. # define LZO_ARCH_IA32 1
  862. # define LZO_INFO_ARCH "i386"
  863. #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
  864. # define LZO_ARCH_IA64 1
  865. # define LZO_INFO_ARCH "ia64"
  866. #elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__)
  867. # define LZO_ARCH_M16C 1
  868. # define LZO_INFO_ARCH "m16c"
  869. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
  870. # define LZO_ARCH_M16C 1
  871. # define LZO_INFO_ARCH "m16c"
  872. #elif defined(__m32r__)
  873. # define LZO_ARCH_M32R 1
  874. # define LZO_INFO_ARCH "m32r"
  875. #elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
  876. # define LZO_ARCH_M68K 1
  877. # define LZO_INFO_ARCH "m68k"
  878. #elif (UINT_MAX == LZO_0xffffL) && defined(__C251__)
  879. # define LZO_ARCH_MCS251 1
  880. # define LZO_INFO_ARCH "mcs251"
  881. #elif (UINT_MAX == LZO_0xffffL) && defined(__C51__)
  882. # define LZO_ARCH_MCS51 1
  883. # define LZO_INFO_ARCH "mcs51"
  884. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
  885. # define LZO_ARCH_MCS51 1
  886. # define LZO_INFO_ARCH "mcs51"
  887. #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
  888. # define LZO_ARCH_MIPS 1
  889. # define LZO_INFO_ARCH "mips"
  890. #elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__)
  891. # define LZO_ARCH_MSP430 1
  892. # define LZO_INFO_ARCH "msp430"
  893. #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
  894. # define LZO_ARCH_MSP430 1
  895. # define LZO_INFO_ARCH "msp430"
  896. #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
  897. # define LZO_ARCH_POWERPC 1
  898. # define LZO_INFO_ARCH "powerpc"
  899. #elif defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__PPC64__)
  900. # define LZO_ARCH_POWERPC 1
  901. # define LZO_INFO_ARCH "powerpc"
  902. #elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__)
  903. # define LZO_ARCH_POWERPC 1
  904. # define LZO_INFO_ARCH "powerpc"
  905. #elif defined(__riscv)
  906. # define LZO_ARCH_RISCV 1
  907. # define LZO_INFO_ARCH "riscv"
  908. #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
  909. # define LZO_ARCH_S390 1
  910. # define LZO_INFO_ARCH "s390"
  911. #elif defined(__sh__) || defined(_M_SH)
  912. # define LZO_ARCH_SH 1
  913. # define LZO_INFO_ARCH "sh"
  914. #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
  915. # define LZO_ARCH_SPARC 1
  916. # define LZO_INFO_ARCH "sparc"
  917. #elif defined(__SPU__)
  918. # define LZO_ARCH_SPU 1
  919. # define LZO_INFO_ARCH "spu"
  920. #elif (UINT_MAX == LZO_0xffffL) && defined(__z80)
  921. # define LZO_ARCH_Z80 1
  922. # define LZO_INFO_ARCH "z80"
  923. #elif (LZO_ARCH_CRAY_PVP)
  924. # if defined(_CRAYSV1)
  925. # define LZO_ARCH_CRAY_SV1 1
  926. # define LZO_INFO_ARCH "cray_sv1"
  927. # elif (_ADDR64)
  928. # define LZO_ARCH_CRAY_T90 1
  929. # define LZO_INFO_ARCH "cray_t90"
  930. # elif (_ADDR32)
  931. # define LZO_ARCH_CRAY_YMP 1
  932. # define LZO_INFO_ARCH "cray_ymp"
  933. # else
  934. # define LZO_ARCH_CRAY_XMP 1
  935. # define LZO_INFO_ARCH "cray_xmp"
  936. # endif
  937. #else
  938. # define LZO_ARCH_UNKNOWN 1
  939. # define LZO_INFO_ARCH "unknown"
  940. #endif
  941. #endif
  942. #if !defined(LZO_ARCH_ARM_THUMB2)
  943. #if (LZO_ARCH_ARM)
  944. # if defined(__thumb__) || defined(__thumb) || defined(_M_THUMB)
  945. # if defined(__thumb2__)
  946. # define LZO_ARCH_ARM_THUMB2 1
  947. # elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4)
  948. # define LZO_ARCH_ARM_THUMB2 1
  949. # elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7)
  950. # define LZO_ARCH_ARM_THUMB2 1
  951. # endif
  952. # endif
  953. #endif
  954. #endif
  955. #if (LZO_ARCH_ARM_THUMB2)
  956. # undef LZO_INFO_ARCH
  957. # define LZO_INFO_ARCH "arm_thumb2"
  958. #endif
  959. #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2)
  960. # error "FIXME - missing define for CPU architecture"
  961. #endif
  962. #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32)
  963. # error "FIXME - missing LZO_OS_WIN32 define for CPU architecture"
  964. #endif
  965. #if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64)
  966. # error "FIXME - missing LZO_OS_WIN64 define for CPU architecture"
  967. #endif
  968. #if (LZO_OS_OS216 || LZO_OS_WIN16)
  969. # define LZO_ARCH_I086PM 1
  970. #elif 1 && (LZO_OS_DOS16 && defined(BLX286))
  971. # define LZO_ARCH_I086PM 1
  972. #elif 1 && (LZO_OS_DOS16 && defined(DOSX286))
  973. # define LZO_ARCH_I086PM 1
  974. #elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__))
  975. # define LZO_ARCH_I086PM 1
  976. #endif
  977. #if (LZO_ARCH_AMD64 && !LZO_ARCH_X64)
  978. # define LZO_ARCH_X64 1
  979. #elif (!LZO_ARCH_AMD64 && LZO_ARCH_X64) && defined(__LZO_ARCH_OVERRIDE)
  980. # define LZO_ARCH_AMD64 1
  981. #endif
  982. #if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64)
  983. # define LZO_ARCH_AARCH64 1
  984. #elif (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64) && defined(__LZO_ARCH_OVERRIDE)
  985. # define LZO_ARCH_ARM64 1
  986. #endif
  987. #if (LZO_ARCH_I386 && !LZO_ARCH_X86)
  988. # define LZO_ARCH_X86 1
  989. #elif (!LZO_ARCH_I386 && LZO_ARCH_X86) && defined(__LZO_ARCH_OVERRIDE)
  990. # define LZO_ARCH_I386 1
  991. #endif
  992. #if (LZO_ARCH_AMD64 && !LZO_ARCH_X64) || (!LZO_ARCH_AMD64 && LZO_ARCH_X64)
  993. # error "unexpected configuration - check your compiler defines"
  994. #endif
  995. #if (LZO_ARCH_ARM64 && !LZO_ARCH_AARCH64) || (!LZO_ARCH_ARM64 && LZO_ARCH_AARCH64)
  996. # error "unexpected configuration - check your compiler defines"
  997. #endif
  998. #if (LZO_ARCH_I386 && !LZO_ARCH_X86) || (!LZO_ARCH_I386 && LZO_ARCH_X86)
  999. # error "unexpected configuration - check your compiler defines"
  1000. #endif
  1001. #if (LZO_ARCH_ARM_THUMB1 && !LZO_ARCH_ARM)
  1002. # error "unexpected configuration - check your compiler defines"
  1003. #endif
  1004. #if (LZO_ARCH_ARM_THUMB2 && !LZO_ARCH_ARM)
  1005. # error "unexpected configuration - check your compiler defines"
  1006. #endif
  1007. #if (LZO_ARCH_ARM_THUMB1 && LZO_ARCH_ARM_THUMB2)
  1008. # error "unexpected configuration - check your compiler defines"
  1009. #endif
  1010. #if (LZO_ARCH_I086PM && !LZO_ARCH_I086)
  1011. # error "unexpected configuration - check your compiler defines"
  1012. #endif
  1013. #if (LZO_ARCH_I086)
  1014. # if (UINT_MAX != LZO_0xffffL)
  1015. # error "unexpected configuration - check your compiler defines"
  1016. # endif
  1017. # if (ULONG_MAX != LZO_0xffffffffL)
  1018. # error "unexpected configuration - check your compiler defines"
  1019. # endif
  1020. #endif
  1021. #if (LZO_ARCH_I386)
  1022. # if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__)
  1023. # error "unexpected configuration - check your compiler defines"
  1024. # endif
  1025. # if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__)
  1026. # error "unexpected configuration - check your compiler defines"
  1027. # endif
  1028. # if (ULONG_MAX != LZO_0xffffffffL)
  1029. # error "unexpected configuration - check your compiler defines"
  1030. # endif
  1031. #endif
  1032. #if (LZO_ARCH_AMD64 || LZO_ARCH_I386)
  1033. # if !defined(LZO_TARGET_FEATURE_SSE2)
  1034. # if defined(__SSE2__)
  1035. # define LZO_TARGET_FEATURE_SSE2 1
  1036. # elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2))
  1037. # define LZO_TARGET_FEATURE_SSE2 1
  1038. # elif (LZO_CC_INTELC_MSC || LZO_CC_MSC) && defined(_M_AMD64)
  1039. # define LZO_TARGET_FEATURE_SSE2 1
  1040. # endif
  1041. # endif
  1042. # if !defined(LZO_TARGET_FEATURE_SSSE3)
  1043. # if (LZO_TARGET_FEATURE_SSE2)
  1044. # if defined(__SSSE3__)
  1045. # define LZO_TARGET_FEATURE_SSSE3 1
  1046. # elif defined(_MSC_VER) && defined(__AVX__)
  1047. # define LZO_TARGET_FEATURE_SSSE3 1
  1048. # endif
  1049. # endif
  1050. # endif
  1051. # if !defined(LZO_TARGET_FEATURE_SSE4_2)
  1052. # if (LZO_TARGET_FEATURE_SSSE3)
  1053. # if defined(__SSE4_2__)
  1054. # define LZO_TARGET_FEATURE_SSE4_2 1
  1055. # endif
  1056. # endif
  1057. # endif
  1058. # if !defined(LZO_TARGET_FEATURE_AVX)
  1059. # if (LZO_TARGET_FEATURE_SSSE3)
  1060. # if defined(__AVX__)
  1061. # define LZO_TARGET_FEATURE_AVX 1
  1062. # endif
  1063. # endif
  1064. # endif
  1065. # if !defined(LZO_TARGET_FEATURE_AVX2)
  1066. # if (LZO_TARGET_FEATURE_AVX)
  1067. # if defined(__AVX2__)
  1068. # define LZO_TARGET_FEATURE_AVX2 1
  1069. # endif
  1070. # endif
  1071. # endif
  1072. #endif
  1073. #if (LZO_TARGET_FEATURE_SSSE3 && !(LZO_TARGET_FEATURE_SSE2))
  1074. # error "unexpected configuration - check your compiler defines"
  1075. #endif
  1076. #if (LZO_TARGET_FEATURE_SSE4_2 && !(LZO_TARGET_FEATURE_SSSE3))
  1077. # error "unexpected configuration - check your compiler defines"
  1078. #endif
  1079. #if (LZO_TARGET_FEATURE_AVX && !(LZO_TARGET_FEATURE_SSSE3))
  1080. # error "unexpected configuration - check your compiler defines"
  1081. #endif
  1082. #if (LZO_TARGET_FEATURE_AVX2 && !(LZO_TARGET_FEATURE_AVX))
  1083. # error "unexpected configuration - check your compiler defines"
  1084. #endif
  1085. #if (LZO_ARCH_ARM)
  1086. # if !defined(LZO_TARGET_FEATURE_NEON)
  1087. # if defined(__ARM_NEON) && ((__ARM_NEON)+0)
  1088. # define LZO_TARGET_FEATURE_NEON 1
  1089. # elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0)
  1090. # define LZO_TARGET_FEATURE_NEON 1
  1091. # elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0)
  1092. # define LZO_TARGET_FEATURE_NEON 1
  1093. # endif
  1094. # endif
  1095. #elif (LZO_ARCH_ARM64)
  1096. # if !defined(LZO_TARGET_FEATURE_NEON)
  1097. # if 1
  1098. # define LZO_TARGET_FEATURE_NEON 1
  1099. # endif
  1100. # endif
  1101. #endif
  1102. #if 0
  1103. #elif !defined(__LZO_MM_OVERRIDE)
  1104. #if (LZO_ARCH_I086)
  1105. #if (UINT_MAX != LZO_0xffffL)
  1106. # error "unexpected configuration - check your compiler defines"
  1107. #endif
  1108. #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
  1109. # define LZO_MM_TINY 1
  1110. #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
  1111. # define LZO_MM_HUGE 1
  1112. #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
  1113. # define LZO_MM_SMALL 1
  1114. #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
  1115. # define LZO_MM_MEDIUM 1
  1116. #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
  1117. # define LZO_MM_COMPACT 1
  1118. #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
  1119. # define LZO_MM_LARGE 1
  1120. #elif (LZO_CC_AZTECC)
  1121. # if defined(_LARGE_CODE) && defined(_LARGE_DATA)
  1122. # define LZO_MM_LARGE 1
  1123. # elif defined(_LARGE_CODE)
  1124. # define LZO_MM_MEDIUM 1
  1125. # elif defined(_LARGE_DATA)
  1126. # define LZO_MM_COMPACT 1
  1127. # else
  1128. # define LZO_MM_SMALL 1
  1129. # endif
  1130. #elif (LZO_CC_ZORTECHC && defined(__VCM__))
  1131. # define LZO_MM_LARGE 1
  1132. #else
  1133. # error "unknown LZO_ARCH_I086 memory model"
  1134. #endif
  1135. #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
  1136. #define LZO_HAVE_MM_HUGE_PTR 1
  1137. #define LZO_HAVE_MM_HUGE_ARRAY 1
  1138. #if (LZO_MM_TINY)
  1139. # undef LZO_HAVE_MM_HUGE_ARRAY
  1140. #endif
  1141. #if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC)
  1142. # undef LZO_HAVE_MM_HUGE_PTR
  1143. # undef LZO_HAVE_MM_HUGE_ARRAY
  1144. #elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
  1145. # undef LZO_HAVE_MM_HUGE_ARRAY
  1146. #elif (LZO_CC_MSC && defined(_QC))
  1147. # undef LZO_HAVE_MM_HUGE_ARRAY
  1148. # if (_MSC_VER < 600)
  1149. # undef LZO_HAVE_MM_HUGE_PTR
  1150. # endif
  1151. #elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295))
  1152. # undef LZO_HAVE_MM_HUGE_ARRAY
  1153. #endif
  1154. #if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR)
  1155. # if (LZO_OS_DOS16)
  1156. # error "unexpected configuration - check your compiler defines"
  1157. # elif (LZO_CC_ZORTECHC)
  1158. # else
  1159. # error "unexpected configuration - check your compiler defines"
  1160. # endif
  1161. #endif
  1162. #if defined(__cplusplus)
  1163. extern "C" {
  1164. #endif
  1165. #if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
  1166. extern void __near __cdecl _AHSHIFT(void);
  1167. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  1168. #elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
  1169. extern void __near __cdecl _AHSHIFT(void);
  1170. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  1171. #elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC)
  1172. extern void __near __cdecl _AHSHIFT(void);
  1173. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  1174. #elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295))
  1175. extern void __near __cdecl _AHSHIFT(void);
  1176. # define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
  1177. #elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16)
  1178. # define LZO_MM_AHSHIFT 12
  1179. #elif (LZO_CC_WATCOMC)
  1180. extern unsigned char _HShift;
  1181. # define LZO_MM_AHSHIFT ((unsigned) _HShift)
  1182. #else
  1183. # error "FIXME - implement LZO_MM_AHSHIFT"
  1184. #endif
  1185. #if defined(__cplusplus)
  1186. }
  1187. #endif
  1188. #endif
  1189. #elif (LZO_ARCH_C166)
  1190. #if !defined(__MODEL__)
  1191. # error "FIXME - LZO_ARCH_C166 __MODEL__"
  1192. #elif ((__MODEL__) == 0)
  1193. # define LZO_MM_SMALL 1
  1194. #elif ((__MODEL__) == 1)
  1195. # define LZO_MM_SMALL 1
  1196. #elif ((__MODEL__) == 2)
  1197. # define LZO_MM_LARGE 1
  1198. #elif ((__MODEL__) == 3)
  1199. # define LZO_MM_TINY 1
  1200. #elif ((__MODEL__) == 4)
  1201. # define LZO_MM_XTINY 1
  1202. #elif ((__MODEL__) == 5)
  1203. # define LZO_MM_XSMALL 1
  1204. #else
  1205. # error "FIXME - LZO_ARCH_C166 __MODEL__"
  1206. #endif
  1207. #elif (LZO_ARCH_MCS251)
  1208. #if !defined(__MODEL__)
  1209. # error "FIXME - LZO_ARCH_MCS251 __MODEL__"
  1210. #elif ((__MODEL__) == 0)
  1211. # define LZO_MM_SMALL 1
  1212. #elif ((__MODEL__) == 2)
  1213. # define LZO_MM_LARGE 1
  1214. #elif ((__MODEL__) == 3)
  1215. # define LZO_MM_TINY 1
  1216. #elif ((__MODEL__) == 4)
  1217. # define LZO_MM_XTINY 1
  1218. #elif ((__MODEL__) == 5)
  1219. # define LZO_MM_XSMALL 1
  1220. #else
  1221. # error "FIXME - LZO_ARCH_MCS251 __MODEL__"
  1222. #endif
  1223. #elif (LZO_ARCH_MCS51)
  1224. #if !defined(__MODEL__)
  1225. # error "FIXME - LZO_ARCH_MCS51 __MODEL__"
  1226. #elif ((__MODEL__) == 1)
  1227. # define LZO_MM_SMALL 1
  1228. #elif ((__MODEL__) == 2)
  1229. # define LZO_MM_LARGE 1
  1230. #elif ((__MODEL__) == 3)
  1231. # define LZO_MM_TINY 1
  1232. #elif ((__MODEL__) == 4)
  1233. # define LZO_MM_XTINY 1
  1234. #elif ((__MODEL__) == 5)
  1235. # define LZO_MM_XSMALL 1
  1236. #else
  1237. # error "FIXME - LZO_ARCH_MCS51 __MODEL__"
  1238. #endif
  1239. #elif (LZO_ARCH_CRAY_PVP)
  1240. # define LZO_MM_PVP 1
  1241. #else
  1242. # define LZO_MM_FLAT 1
  1243. #endif
  1244. #if (LZO_MM_COMPACT)
  1245. # define LZO_INFO_MM "compact"
  1246. #elif (LZO_MM_FLAT)
  1247. # define LZO_INFO_MM "flat"
  1248. #elif (LZO_MM_HUGE)
  1249. # define LZO_INFO_MM "huge"
  1250. #elif (LZO_MM_LARGE)
  1251. # define LZO_INFO_MM "large"
  1252. #elif (LZO_MM_MEDIUM)
  1253. # define LZO_INFO_MM "medium"
  1254. #elif (LZO_MM_PVP)
  1255. # define LZO_INFO_MM "pvp"
  1256. #elif (LZO_MM_SMALL)
  1257. # define LZO_INFO_MM "small"
  1258. #elif (LZO_MM_TINY)
  1259. # define LZO_INFO_MM "tiny"
  1260. #else
  1261. # error "unknown memory model"
  1262. #endif
  1263. #endif
  1264. #if !defined(__lzo_gnuc_extension__)
  1265. #if (LZO_CC_GNUC >= 0x020800ul)
  1266. # define __lzo_gnuc_extension__ __extension__
  1267. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1268. # define __lzo_gnuc_extension__ __extension__
  1269. #elif (LZO_CC_IBMC >= 600)
  1270. # define __lzo_gnuc_extension__ __extension__
  1271. #endif
  1272. #endif
  1273. #if !defined(__lzo_gnuc_extension__)
  1274. # define __lzo_gnuc_extension__ /*empty*/
  1275. #endif
  1276. #if !defined(lzo_has_builtin)
  1277. #if (LZO_CC_CLANG) && defined(__has_builtin)
  1278. # define lzo_has_builtin __has_builtin
  1279. #endif
  1280. #endif
  1281. #if !defined(lzo_has_builtin)
  1282. # define lzo_has_builtin(x) 0
  1283. #endif
  1284. #if !defined(lzo_has_attribute)
  1285. #if (LZO_CC_CLANG) && defined(__has_attribute)
  1286. # define lzo_has_attribute __has_attribute
  1287. #endif
  1288. #endif
  1289. #if !defined(lzo_has_attribute)
  1290. # define lzo_has_attribute(x) 0
  1291. #endif
  1292. #if !defined(lzo_has_declspec_attribute)
  1293. #if (LZO_CC_CLANG) && defined(__has_declspec_attribute)
  1294. # define lzo_has_declspec_attribute __has_declspec_attribute
  1295. #endif
  1296. #endif
  1297. #if !defined(lzo_has_declspec_attribute)
  1298. # define lzo_has_declspec_attribute(x) 0
  1299. #endif
  1300. #if !defined(lzo_has_feature)
  1301. #if (LZO_CC_CLANG) && defined(__has_feature)
  1302. # define lzo_has_feature __has_feature
  1303. #endif
  1304. #endif
  1305. #if !defined(lzo_has_feature)
  1306. # define lzo_has_feature(x) 0
  1307. #endif
  1308. #if !defined(lzo_has_extension)
  1309. #if (LZO_CC_CLANG) && defined(__has_extension)
  1310. # define lzo_has_extension __has_extension
  1311. #elif (LZO_CC_CLANG) && defined(__has_feature)
  1312. # define lzo_has_extension __has_feature
  1313. #endif
  1314. #endif
  1315. #if !defined(lzo_has_extension)
  1316. # define lzo_has_extension(x) 0
  1317. #endif
  1318. #if !defined(LZO_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0
  1319. # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul))
  1320. # define LZO_CFG_USE_NEW_STYLE_CASTS 0
  1321. # elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1200))
  1322. # define LZO_CFG_USE_NEW_STYLE_CASTS 0
  1323. # else
  1324. # define LZO_CFG_USE_NEW_STYLE_CASTS 1
  1325. # endif
  1326. #endif
  1327. #if !defined(LZO_CFG_USE_NEW_STYLE_CASTS)
  1328. # define LZO_CFG_USE_NEW_STYLE_CASTS 0
  1329. #endif
  1330. #if !defined(__cplusplus)
  1331. # if defined(LZO_CFG_USE_NEW_STYLE_CASTS)
  1332. # undef LZO_CFG_USE_NEW_STYLE_CASTS
  1333. # endif
  1334. # define LZO_CFG_USE_NEW_STYLE_CASTS 0
  1335. #endif
  1336. #if !defined(LZO_REINTERPRET_CAST)
  1337. # if (LZO_CFG_USE_NEW_STYLE_CASTS)
  1338. # define LZO_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e))
  1339. # endif
  1340. #endif
  1341. #if !defined(LZO_REINTERPRET_CAST)
  1342. # define LZO_REINTERPRET_CAST(t,e) ((t) (e))
  1343. #endif
  1344. #if !defined(LZO_STATIC_CAST)
  1345. # if (LZO_CFG_USE_NEW_STYLE_CASTS)
  1346. # define LZO_STATIC_CAST(t,e) (static_cast<t> (e))
  1347. # endif
  1348. #endif
  1349. #if !defined(LZO_STATIC_CAST)
  1350. # define LZO_STATIC_CAST(t,e) ((t) (e))
  1351. #endif
  1352. #if !defined(LZO_STATIC_CAST2)
  1353. # define LZO_STATIC_CAST2(t1,t2,e) LZO_STATIC_CAST(t1, LZO_STATIC_CAST(t2, e))
  1354. #endif
  1355. #if !defined(LZO_UNCONST_CAST)
  1356. # if (LZO_CFG_USE_NEW_STYLE_CASTS)
  1357. # define LZO_UNCONST_CAST(t,e) (const_cast<t> (e))
  1358. # elif (LZO_HAVE_MM_HUGE_PTR)
  1359. # define LZO_UNCONST_CAST(t,e) ((t) (e))
  1360. # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1361. # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((const void *) (e)))))
  1362. # endif
  1363. #endif
  1364. #if !defined(LZO_UNCONST_CAST)
  1365. # define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e))))
  1366. #endif
  1367. #if !defined(LZO_UNCONST_VOLATILE_CAST)
  1368. # if (LZO_CFG_USE_NEW_STYLE_CASTS)
  1369. # define LZO_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e))
  1370. # elif (LZO_HAVE_MM_HUGE_PTR)
  1371. # define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) (e))
  1372. # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1373. # define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((lzo_uintptr_t) ((volatile const void *) (e)))))
  1374. # endif
  1375. #endif
  1376. #if !defined(LZO_UNCONST_VOLATILE_CAST)
  1377. # define LZO_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e))))
  1378. #endif
  1379. #if !defined(LZO_UNVOLATILE_CAST)
  1380. # if (LZO_CFG_USE_NEW_STYLE_CASTS)
  1381. # define LZO_UNVOLATILE_CAST(t,e) (const_cast<t> (e))
  1382. # elif (LZO_HAVE_MM_HUGE_PTR)
  1383. # define LZO_UNVOLATILE_CAST(t,e) ((t) (e))
  1384. # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1385. # define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((lzo_uintptr_t) ((volatile void *) (e)))))
  1386. # endif
  1387. #endif
  1388. #if !defined(LZO_UNVOLATILE_CAST)
  1389. # define LZO_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e))))
  1390. #endif
  1391. #if !defined(LZO_UNVOLATILE_CONST_CAST)
  1392. # if (LZO_CFG_USE_NEW_STYLE_CASTS)
  1393. # define LZO_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e))
  1394. # elif (LZO_HAVE_MM_HUGE_PTR)
  1395. # define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) (e))
  1396. # elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1397. # define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((lzo_uintptr_t) ((volatile const void *) (e)))))
  1398. # endif
  1399. #endif
  1400. #if !defined(LZO_UNVOLATILE_CONST_CAST)
  1401. # define LZO_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e))))
  1402. #endif
  1403. #if !defined(LZO_PCAST)
  1404. # if (LZO_HAVE_MM_HUGE_PTR)
  1405. # define LZO_PCAST(t,e) ((t) (e))
  1406. # endif
  1407. #endif
  1408. #if !defined(LZO_PCAST)
  1409. # define LZO_PCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(void *, e))
  1410. #endif
  1411. #if !defined(LZO_CCAST)
  1412. # if (LZO_HAVE_MM_HUGE_PTR)
  1413. # define LZO_CCAST(t,e) ((t) (e))
  1414. # endif
  1415. #endif
  1416. #if !defined(LZO_CCAST)
  1417. # define LZO_CCAST(t,e) LZO_STATIC_CAST(t, LZO_STATIC_CAST(const void *, e))
  1418. #endif
  1419. #if !defined(LZO_ICONV)
  1420. # define LZO_ICONV(t,e) LZO_STATIC_CAST(t, e)
  1421. #endif
  1422. #if !defined(LZO_ICAST)
  1423. # define LZO_ICAST(t,e) LZO_STATIC_CAST(t, e)
  1424. #endif
  1425. #if !defined(LZO_ITRUNC)
  1426. # define LZO_ITRUNC(t,e) LZO_STATIC_CAST(t, e)
  1427. #endif
  1428. #if !defined(__lzo_cte)
  1429. # if (LZO_CC_MSC || LZO_CC_WATCOMC)
  1430. # define __lzo_cte(e) ((void)0,(e))
  1431. # elif 1
  1432. # define __lzo_cte(e) ((void)0,(e))
  1433. # endif
  1434. #endif
  1435. #if !defined(__lzo_cte)
  1436. # define __lzo_cte(e) (e)
  1437. #endif
  1438. #if !defined(LZO_BLOCK_BEGIN)
  1439. # define LZO_BLOCK_BEGIN do {
  1440. # define LZO_BLOCK_END } while __lzo_cte(0)
  1441. #endif
  1442. #if !defined(LZO_UNUSED)
  1443. # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
  1444. # define LZO_UNUSED(var) ((void) &var)
  1445. # elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC)
  1446. # define LZO_UNUSED(var) if (&var) ; else
  1447. # elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030200ul))
  1448. # define LZO_UNUSED(var) ((void) &var)
  1449. # elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1450. # define LZO_UNUSED(var) ((void) var)
  1451. # elif (LZO_CC_MSC && (_MSC_VER < 900))
  1452. # define LZO_UNUSED(var) if (&var) ; else
  1453. # elif (LZO_CC_KEILC)
  1454. # define LZO_UNUSED(var) {extern int lzo_unused__[1-2*!(sizeof(var)>0)]; (void)lzo_unused__;}
  1455. # elif (LZO_CC_PACIFICC)
  1456. # define LZO_UNUSED(var) ((void) sizeof(var))
  1457. # elif (LZO_CC_WATCOMC) && defined(__cplusplus)
  1458. # define LZO_UNUSED(var) ((void) var)
  1459. # else
  1460. # define LZO_UNUSED(var) ((void) &var)
  1461. # endif
  1462. #endif
  1463. #if !defined(LZO_UNUSED_RESULT)
  1464. # define LZO_UNUSED_RESULT(var) LZO_UNUSED(var)
  1465. #endif
  1466. #if !defined(LZO_UNUSED_FUNC)
  1467. # if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
  1468. # define LZO_UNUSED_FUNC(func) ((void) func)
  1469. # elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC)
  1470. # define LZO_UNUSED_FUNC(func) if (func) ; else
  1471. # elif (LZO_CC_CLANG || LZO_CC_LLVM)
  1472. # define LZO_UNUSED_FUNC(func) ((void) &func)
  1473. # elif (LZO_CC_MSC && (_MSC_VER < 900))
  1474. # define LZO_UNUSED_FUNC(func) if (func) ; else
  1475. # elif (LZO_CC_MSC)
  1476. # define LZO_UNUSED_FUNC(func) ((void) &func)
  1477. # elif (LZO_CC_KEILC || LZO_CC_PELLESC)
  1478. # define LZO_UNUSED_FUNC(func) {extern int lzo_unused__[1-2*!(sizeof((int)func)>0)]; (void)lzo_unused__;}
  1479. # else
  1480. # define LZO_UNUSED_FUNC(func) ((void) func)
  1481. # endif
  1482. #endif
  1483. #if !defined(LZO_UNUSED_LABEL)
  1484. # if (LZO_CC_CLANG >= 0x020800ul)
  1485. # define LZO_UNUSED_LABEL(l) (__lzo_gnuc_extension__ ((void) ((const void *) &&l)))
  1486. # elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC)
  1487. # define LZO_UNUSED_LABEL(l) if __lzo_cte(0) goto l
  1488. # else
  1489. # define LZO_UNUSED_LABEL(l) switch (0) case 1:goto l
  1490. # endif
  1491. #endif
  1492. #if !defined(LZO_DEFINE_UNINITIALIZED_VAR)
  1493. # if 0
  1494. # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
  1495. # elif 0 && (LZO_CC_GNUC)
  1496. # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
  1497. # else
  1498. # define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
  1499. # endif
  1500. #endif
  1501. #if !defined(__lzo_inline)
  1502. #if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295))
  1503. #elif defined(__cplusplus)
  1504. # define __lzo_inline inline
  1505. #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
  1506. # define __lzo_inline inline
  1507. #elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
  1508. # define __lzo_inline __inline
  1509. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
  1510. # define __lzo_inline __inline__
  1511. #elif (LZO_CC_DMC)
  1512. # define __lzo_inline __inline
  1513. #elif (LZO_CC_GHS)
  1514. # define __lzo_inline __inline__
  1515. #elif (LZO_CC_IBMC >= 600)
  1516. # define __lzo_inline __inline__
  1517. #elif (LZO_CC_INTELC)
  1518. # define __lzo_inline __inline
  1519. #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405))
  1520. # define __lzo_inline __inline
  1521. #elif (LZO_CC_MSC && (_MSC_VER >= 900))
  1522. # define __lzo_inline __inline
  1523. #elif (LZO_CC_SUNPROC >= 0x5100)
  1524. # define __lzo_inline __inline__
  1525. #endif
  1526. #endif
  1527. #if defined(__lzo_inline)
  1528. # ifndef __lzo_HAVE_inline
  1529. # define __lzo_HAVE_inline 1
  1530. # endif
  1531. #else
  1532. # define __lzo_inline /*empty*/
  1533. #endif
  1534. #if !defined(__lzo_forceinline)
  1535. #if (LZO_CC_GNUC >= 0x030200ul)
  1536. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1537. #elif (LZO_CC_IBMC >= 700)
  1538. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1539. #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
  1540. # define __lzo_forceinline __forceinline
  1541. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
  1542. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1543. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1544. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1545. #elif (LZO_CC_MSC && (_MSC_VER >= 1200))
  1546. # define __lzo_forceinline __forceinline
  1547. #elif (LZO_CC_PGI >= 0x0d0a00ul)
  1548. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1549. #elif (LZO_CC_SUNPROC >= 0x5100)
  1550. # define __lzo_forceinline __inline__ __attribute__((__always_inline__))
  1551. #endif
  1552. #endif
  1553. #if defined(__lzo_forceinline)
  1554. # ifndef __lzo_HAVE_forceinline
  1555. # define __lzo_HAVE_forceinline 1
  1556. # endif
  1557. #else
  1558. # define __lzo_forceinline __lzo_inline
  1559. #endif
  1560. #if !defined(__lzo_noinline)
  1561. #if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
  1562. # define __lzo_noinline __attribute__((__noinline__,__used__))
  1563. #elif (LZO_CC_GNUC >= 0x030200ul)
  1564. # define __lzo_noinline __attribute__((__noinline__))
  1565. #elif (LZO_CC_IBMC >= 700)
  1566. # define __lzo_noinline __attribute__((__noinline__))
  1567. #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
  1568. # define __lzo_noinline __declspec(noinline)
  1569. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
  1570. # define __lzo_noinline __attribute__((__noinline__))
  1571. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1572. # define __lzo_noinline __attribute__((__noinline__))
  1573. #elif (LZO_CC_MSC && (_MSC_VER >= 1300))
  1574. # define __lzo_noinline __declspec(noinline)
  1575. #elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64))
  1576. # if defined(__cplusplus)
  1577. # else
  1578. # define __lzo_noinline __declspec(noinline)
  1579. # endif
  1580. #elif (LZO_CC_PGI >= 0x0d0a00ul)
  1581. # define __lzo_noinline __attribute__((__noinline__))
  1582. #elif (LZO_CC_SUNPROC >= 0x5100)
  1583. # define __lzo_noinline __attribute__((__noinline__))
  1584. #endif
  1585. #endif
  1586. #if defined(__lzo_noinline)
  1587. # ifndef __lzo_HAVE_noinline
  1588. # define __lzo_HAVE_noinline 1
  1589. # endif
  1590. #else
  1591. # define __lzo_noinline /*empty*/
  1592. #endif
  1593. #if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline)
  1594. # error "unexpected configuration - check your compiler defines"
  1595. #endif
  1596. #if !defined(__lzo_static_inline)
  1597. #if (LZO_CC_IBMC)
  1598. # define __lzo_static_inline __lzo_gnuc_extension__ static __lzo_inline
  1599. #endif
  1600. #endif
  1601. #if !defined(__lzo_static_inline)
  1602. # define __lzo_static_inline static __lzo_inline
  1603. #endif
  1604. #if !defined(__lzo_static_forceinline)
  1605. #if (LZO_CC_IBMC)
  1606. # define __lzo_static_forceinline __lzo_gnuc_extension__ static __lzo_forceinline
  1607. #endif
  1608. #endif
  1609. #if !defined(__lzo_static_forceinline)
  1610. # define __lzo_static_forceinline static __lzo_forceinline
  1611. #endif
  1612. #if !defined(__lzo_static_noinline)
  1613. #if (LZO_CC_IBMC)
  1614. # define __lzo_static_noinline __lzo_gnuc_extension__ static __lzo_noinline
  1615. #endif
  1616. #endif
  1617. #if !defined(__lzo_static_noinline)
  1618. # define __lzo_static_noinline static __lzo_noinline
  1619. #endif
  1620. #if !defined(__lzo_c99_extern_inline)
  1621. #if defined(__GNUC_GNU_INLINE__)
  1622. # define __lzo_c99_extern_inline __lzo_inline
  1623. #elif defined(__GNUC_STDC_INLINE__)
  1624. # define __lzo_c99_extern_inline extern __lzo_inline
  1625. #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
  1626. # define __lzo_c99_extern_inline extern __lzo_inline
  1627. #endif
  1628. #if !defined(__lzo_c99_extern_inline) && (__lzo_HAVE_inline)
  1629. # define __lzo_c99_extern_inline __lzo_inline
  1630. #endif
  1631. #endif
  1632. #if defined(__lzo_c99_extern_inline)
  1633. # ifndef __lzo_HAVE_c99_extern_inline
  1634. # define __lzo_HAVE_c99_extern_inline 1
  1635. # endif
  1636. #else
  1637. # define __lzo_c99_extern_inline /*empty*/
  1638. #endif
  1639. #if !defined(__lzo_may_alias)
  1640. #if (LZO_CC_GNUC >= 0x030400ul)
  1641. # define __lzo_may_alias __attribute__((__may_alias__))
  1642. #elif (LZO_CC_CLANG >= 0x020900ul)
  1643. # define __lzo_may_alias __attribute__((__may_alias__))
  1644. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0
  1645. # define __lzo_may_alias __attribute__((__may_alias__))
  1646. #elif (LZO_CC_PGI >= 0x0d0a00ul) && 0
  1647. # define __lzo_may_alias __attribute__((__may_alias__))
  1648. #endif
  1649. #endif
  1650. #if defined(__lzo_may_alias)
  1651. # ifndef __lzo_HAVE_may_alias
  1652. # define __lzo_HAVE_may_alias 1
  1653. # endif
  1654. #else
  1655. # define __lzo_may_alias /*empty*/
  1656. #endif
  1657. #if !defined(__lzo_noreturn)
  1658. #if (LZO_CC_GNUC >= 0x020700ul)
  1659. # define __lzo_noreturn __attribute__((__noreturn__))
  1660. #elif (LZO_CC_IBMC >= 700)
  1661. # define __lzo_noreturn __attribute__((__noreturn__))
  1662. #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
  1663. # define __lzo_noreturn __declspec(noreturn)
  1664. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
  1665. # define __lzo_noreturn __attribute__((__noreturn__))
  1666. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1667. # define __lzo_noreturn __attribute__((__noreturn__))
  1668. #elif (LZO_CC_MSC && (_MSC_VER >= 1200))
  1669. # define __lzo_noreturn __declspec(noreturn)
  1670. #elif (LZO_CC_PGI >= 0x0d0a00ul)
  1671. # define __lzo_noreturn __attribute__((__noreturn__))
  1672. #endif
  1673. #endif
  1674. #if defined(__lzo_noreturn)
  1675. # ifndef __lzo_HAVE_noreturn
  1676. # define __lzo_HAVE_noreturn 1
  1677. # endif
  1678. #else
  1679. # define __lzo_noreturn /*empty*/
  1680. #endif
  1681. #if !defined(__lzo_nothrow)
  1682. #if (LZO_CC_GNUC >= 0x030300ul)
  1683. # define __lzo_nothrow __attribute__((__nothrow__))
  1684. #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus)
  1685. # define __lzo_nothrow __declspec(nothrow)
  1686. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900))
  1687. # define __lzo_nothrow __attribute__((__nothrow__))
  1688. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1689. # define __lzo_nothrow __attribute__((__nothrow__))
  1690. #elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
  1691. # define __lzo_nothrow __declspec(nothrow)
  1692. #endif
  1693. #endif
  1694. #if defined(__lzo_nothrow)
  1695. # ifndef __lzo_HAVE_nothrow
  1696. # define __lzo_HAVE_nothrow 1
  1697. # endif
  1698. #else
  1699. # define __lzo_nothrow /*empty*/
  1700. #endif
  1701. #if !defined(__lzo_restrict)
  1702. #if (LZO_CC_GNUC >= 0x030400ul)
  1703. # define __lzo_restrict __restrict__
  1704. #elif (LZO_CC_IBMC >= 800) && !defined(__cplusplus)
  1705. # define __lzo_restrict __restrict__
  1706. #elif (LZO_CC_IBMC >= 1210)
  1707. # define __lzo_restrict __restrict__
  1708. #elif (LZO_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
  1709. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
  1710. # define __lzo_restrict __restrict__
  1711. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM)
  1712. # define __lzo_restrict __restrict__
  1713. #elif (LZO_CC_MSC && (_MSC_VER >= 1400))
  1714. # define __lzo_restrict __restrict
  1715. #elif (LZO_CC_PGI >= 0x0d0a00ul)
  1716. # define __lzo_restrict __restrict__
  1717. #endif
  1718. #endif
  1719. #if defined(__lzo_restrict)
  1720. # ifndef __lzo_HAVE_restrict
  1721. # define __lzo_HAVE_restrict 1
  1722. # endif
  1723. #else
  1724. # define __lzo_restrict /*empty*/
  1725. #endif
  1726. #if !defined(__lzo_alignof)
  1727. #if (LZO_CC_ARMCC || LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
  1728. # define __lzo_alignof(e) __alignof__(e)
  1729. #elif (LZO_CC_GHS) && !defined(__cplusplus)
  1730. # define __lzo_alignof(e) __alignof__(e)
  1731. #elif (LZO_CC_IBMC >= 600)
  1732. # define __lzo_alignof(e) (__lzo_gnuc_extension__ __alignof__(e))
  1733. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
  1734. # define __lzo_alignof(e) __alignof__(e)
  1735. #elif (LZO_CC_MSC && (_MSC_VER >= 1300))
  1736. # define __lzo_alignof(e) __alignof(e)
  1737. #elif (LZO_CC_SUNPROC >= 0x5100)
  1738. # define __lzo_alignof(e) __alignof__(e)
  1739. #endif
  1740. #endif
  1741. #if defined(__lzo_alignof)
  1742. # ifndef __lzo_HAVE_alignof
  1743. # define __lzo_HAVE_alignof 1
  1744. # endif
  1745. #endif
  1746. #if !defined(__lzo_struct_packed)
  1747. #if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
  1748. #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul))
  1749. #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
  1750. #elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul))
  1751. #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
  1752. #elif (LZO_CC_GNUC >= 0x030400ul) && !(LZO_CC_PCC_GNUC) && (LZO_ARCH_AMD64 || LZO_ARCH_I386)
  1753. # define __lzo_struct_packed(s) struct s {
  1754. # define __lzo_struct_packed_end() } __attribute__((__gcc_struct__,__packed__));
  1755. # define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__gcc_struct__,__packed__));
  1756. #elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100))
  1757. # define __lzo_struct_packed(s) struct s {
  1758. # define __lzo_struct_packed_end() } __attribute__((__packed__));
  1759. # define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__));
  1760. #elif (LZO_CC_IBMC >= 700)
  1761. # define __lzo_struct_packed(s) __lzo_gnuc_extension__ struct s {
  1762. # define __lzo_struct_packed_end() } __attribute__((__packed__));
  1763. # define __lzo_struct_packed_ma_end() } __lzo_may_alias __attribute__((__packed__));
  1764. #elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300))
  1765. # define __lzo_struct_packed(s) __pragma(pack(push,1)) struct s {
  1766. # define __lzo_struct_packed_end() } __pragma(pack(pop));
  1767. #elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900))
  1768. # define __lzo_struct_packed(s) _Packed struct s {
  1769. # define __lzo_struct_packed_end() };
  1770. #endif
  1771. #endif
  1772. #if defined(__lzo_struct_packed) && !defined(__lzo_struct_packed_ma)
  1773. # define __lzo_struct_packed_ma(s) __lzo_struct_packed(s)
  1774. #endif
  1775. #if defined(__lzo_struct_packed_end) && !defined(__lzo_struct_packed_ma_end)
  1776. # define __lzo_struct_packed_ma_end() __lzo_struct_packed_end()
  1777. #endif
  1778. #if !defined(__lzo_byte_struct)
  1779. #if defined(__lzo_struct_packed)
  1780. # define __lzo_byte_struct(s,n) __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end()
  1781. # define __lzo_byte_struct_ma(s,n) __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end()
  1782. #elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_PGI || (LZO_CC_SUNPROC >= 0x5100))
  1783. # define __lzo_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__));
  1784. # define __lzo_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__));
  1785. #endif
  1786. #endif
  1787. #if defined(__lzo_byte_struct) && !defined(__lzo_byte_struct_ma)
  1788. # define __lzo_byte_struct_ma(s,n) __lzo_byte_struct(s,n)
  1789. #endif
  1790. #if !defined(__lzo_struct_align16) && (__lzo_HAVE_alignof)
  1791. #if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul))
  1792. #elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
  1793. #elif (LZO_CC_CILLY || LZO_CC_PCC)
  1794. #elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300))
  1795. # define __lzo_struct_align16(s) struct __declspec(align(16)) s {
  1796. # define __lzo_struct_align16_end() };
  1797. # define __lzo_struct_align32(s) struct __declspec(align(32)) s {
  1798. # define __lzo_struct_align32_end() };
  1799. # define __lzo_struct_align64(s) struct __declspec(align(64)) s {
  1800. # define __lzo_struct_align64_end() };
  1801. #elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || (LZO_CC_IBMC >= 700) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1802. # define __lzo_struct_align16(s) struct s {
  1803. # define __lzo_struct_align16_end() } __attribute__((__aligned__(16)));
  1804. # define __lzo_struct_align32(s) struct s {
  1805. # define __lzo_struct_align32_end() } __attribute__((__aligned__(32)));
  1806. # define __lzo_struct_align64(s) struct s {
  1807. # define __lzo_struct_align64_end() } __attribute__((__aligned__(64)));
  1808. #endif
  1809. #endif
  1810. #if !defined(__lzo_union_um)
  1811. #if (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
  1812. #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020700ul))
  1813. #elif (LZO_CC_GNUC && (LZO_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
  1814. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER < 810))
  1815. #elif (LZO_CC_PCC && (LZO_CC_PCC < 0x010100ul))
  1816. #elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
  1817. #elif (LZO_CC_ARMCC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || (LZO_CC_PGI >= 0x0d0a00ul) || (LZO_CC_SUNPROC >= 0x5100))
  1818. # define __lzo_union_am(s) union s {
  1819. # define __lzo_union_am_end() } __lzo_may_alias;
  1820. # define __lzo_union_um(s) union s {
  1821. # define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__));
  1822. #elif (LZO_CC_IBMC >= 700)
  1823. # define __lzo_union_am(s) __lzo_gnuc_extension__ union s {
  1824. # define __lzo_union_am_end() } __lzo_may_alias;
  1825. # define __lzo_union_um(s) __lzo_gnuc_extension__ union s {
  1826. # define __lzo_union_um_end() } __lzo_may_alias __attribute__((__packed__));
  1827. #elif (LZO_CC_INTELC_MSC) || (LZO_CC_MSC && (_MSC_VER >= 1300))
  1828. # define __lzo_union_um(s) __pragma(pack(push,1)) union s {
  1829. # define __lzo_union_um_end() } __pragma(pack(pop));
  1830. #elif (LZO_CC_WATCOMC && (__WATCOMC__ >= 900))
  1831. # define __lzo_union_um(s) _Packed union s {
  1832. # define __lzo_union_um_end() };
  1833. #endif
  1834. #endif
  1835. #if !defined(__lzo_union_am)
  1836. # define __lzo_union_am(s) union s {
  1837. # define __lzo_union_am_end() };
  1838. #endif
  1839. #if !defined(__lzo_constructor)
  1840. #if (LZO_CC_GNUC >= 0x030400ul)
  1841. # define __lzo_constructor __attribute__((__constructor__,__used__))
  1842. #elif (LZO_CC_GNUC >= 0x020700ul)
  1843. # define __lzo_constructor __attribute__((__constructor__))
  1844. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
  1845. # define __lzo_constructor __attribute__((__constructor__,__used__))
  1846. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1847. # define __lzo_constructor __attribute__((__constructor__))
  1848. #endif
  1849. #endif
  1850. #if defined(__lzo_constructor)
  1851. # ifndef __lzo_HAVE_constructor
  1852. # define __lzo_HAVE_constructor 1
  1853. # endif
  1854. #endif
  1855. #if !defined(__lzo_destructor)
  1856. #if (LZO_CC_GNUC >= 0x030400ul)
  1857. # define __lzo_destructor __attribute__((__destructor__,__used__))
  1858. #elif (LZO_CC_GNUC >= 0x020700ul)
  1859. # define __lzo_destructor __attribute__((__destructor__))
  1860. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
  1861. # define __lzo_destructor __attribute__((__destructor__,__used__))
  1862. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1863. # define __lzo_destructor __attribute__((__destructor__))
  1864. #endif
  1865. #endif
  1866. #if defined(__lzo_destructor)
  1867. # ifndef __lzo_HAVE_destructor
  1868. # define __lzo_HAVE_destructor 1
  1869. # endif
  1870. #endif
  1871. #if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor)
  1872. # error "unexpected configuration - check your compiler defines"
  1873. #endif
  1874. #if !defined(__lzo_likely) && !defined(__lzo_unlikely)
  1875. #if (LZO_CC_GNUC >= 0x030200ul)
  1876. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1877. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1878. #elif (LZO_CC_IBMC >= 1010)
  1879. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1880. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1881. #elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800))
  1882. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1883. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1884. #elif (LZO_CC_CLANG && LZO_CC_CLANG_C2)
  1885. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  1886. # define __lzo_likely(e) (__builtin_expect(!!(e),1))
  1887. # define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
  1888. #endif
  1889. #endif
  1890. #if defined(__lzo_likely)
  1891. # ifndef __lzo_HAVE_likely
  1892. # define __lzo_HAVE_likely 1
  1893. # endif
  1894. #else
  1895. # define __lzo_likely(e) (e)
  1896. #endif
  1897. #if defined(__lzo_very_likely)
  1898. # ifndef __lzo_HAVE_very_likely
  1899. # define __lzo_HAVE_very_likely 1
  1900. # endif
  1901. #else
  1902. # define __lzo_very_likely(e) __lzo_likely(e)
  1903. #endif
  1904. #if defined(__lzo_unlikely)
  1905. # ifndef __lzo_HAVE_unlikely
  1906. # define __lzo_HAVE_unlikely 1
  1907. # endif
  1908. #else
  1909. # define __lzo_unlikely(e) (e)
  1910. #endif
  1911. #if defined(__lzo_very_unlikely)
  1912. # ifndef __lzo_HAVE_very_unlikely
  1913. # define __lzo_HAVE_very_unlikely 1
  1914. # endif
  1915. #else
  1916. # define __lzo_very_unlikely(e) __lzo_unlikely(e)
  1917. #endif
  1918. #if !defined(__lzo_loop_forever)
  1919. # if (LZO_CC_IBMC)
  1920. # define __lzo_loop_forever() LZO_BLOCK_BEGIN for (;;) { ; } LZO_BLOCK_END
  1921. # else
  1922. # define __lzo_loop_forever() do { ; } while __lzo_cte(1)
  1923. # endif
  1924. #endif
  1925. #if !defined(__lzo_unreachable)
  1926. #if (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x020800ul)) && lzo_has_builtin(__builtin_unreachable)
  1927. # define __lzo_unreachable() __builtin_unreachable();
  1928. #elif (LZO_CC_GNUC >= 0x040500ul)
  1929. # define __lzo_unreachable() __builtin_unreachable();
  1930. #elif (LZO_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1
  1931. # define __lzo_unreachable() __builtin_unreachable();
  1932. #endif
  1933. #endif
  1934. #if defined(__lzo_unreachable)
  1935. # ifndef __lzo_HAVE_unreachable
  1936. # define __lzo_HAVE_unreachable 1
  1937. # endif
  1938. #else
  1939. # if 0
  1940. # define __lzo_unreachable() ((void)0);
  1941. # else
  1942. # define __lzo_unreachable() __lzo_loop_forever();
  1943. # endif
  1944. #endif
  1945. #if !defined(lzo_unused_funcs_impl)
  1946. # if 1 && (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_INTELC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
  1947. # define lzo_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f
  1948. # elif 1 && (LZO_CC_BORLANDC || LZO_CC_GNUC)
  1949. # define lzo_unused_funcs_impl(r,f) static r f
  1950. # else
  1951. # define lzo_unused_funcs_impl(r,f) __lzo_static_forceinline r f
  1952. # endif
  1953. #endif
  1954. #ifndef __LZO_CTA_NAME
  1955. #if (LZO_CFG_USE_COUNTER)
  1956. # define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__COUNTER__)
  1957. #else
  1958. # define __LZO_CTA_NAME(a) LZO_PP_ECONCAT2(a,__LINE__)
  1959. #endif
  1960. #endif
  1961. #if !defined(LZO_COMPILE_TIME_ASSERT_HEADER)
  1962. # if (LZO_CC_AZTECC || LZO_CC_ZORTECHC)
  1963. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END
  1964. # elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
  1965. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1u-2*!(e)]; LZO_EXTERN_C_END
  1966. # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
  1967. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-!(e)]; LZO_EXTERN_C_END
  1968. # elif (LZO_CC_CLANG && (LZO_CC_CLANG < 0x020900ul)) && defined(__cplusplus)
  1969. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN int __LZO_CTA_NAME(lzo_cta_f__)(int [1-2*!(e)]); LZO_EXTERN_C_END
  1970. # elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
  1971. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__)); LZO_EXTERN_C_END
  1972. # else
  1973. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) LZO_EXTERN_C_BEGIN extern int __LZO_CTA_NAME(lzo_cta__)[1-2*!(e)]; LZO_EXTERN_C_END
  1974. # endif
  1975. #endif
  1976. #if !defined(LZO_COMPILE_TIME_ASSERT)
  1977. # if (LZO_CC_AZTECC)
  1978. # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-!(e)];}
  1979. # elif (LZO_CC_CLANG && (LZO_CC_CLANG >= 0x030000ul))
  1980. # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
  1981. # elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
  1982. # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
  1983. # elif (LZO_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
  1984. # define LZO_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));}
  1985. # elif (LZO_CC_GNUC >= 0x040700ul) && (LZO_CFG_USE_COUNTER) && defined(__cplusplus)
  1986. # define LZO_COMPILE_TIME_ASSERT(e) {enum {__LZO_CTA_NAME(lzo_cta_e__)=1/!!(e)} __attribute__((__unused__));}
  1987. # elif (LZO_CC_GNUC >= 0x040700ul)
  1988. # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
  1989. # elif (LZO_CC_MSC && (_MSC_VER < 900))
  1990. # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
  1991. # elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
  1992. # define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
  1993. # else
  1994. # define LZO_COMPILE_TIME_ASSERT(e) {typedef int __LZO_CTA_NAME(lzo_cta_t__)[1-2*!(e)];}
  1995. # endif
  1996. #endif
  1997. #if (LZO_LANG_ASSEMBLER)
  1998. # undef LZO_COMPILE_TIME_ASSERT_HEADER
  1999. # define LZO_COMPILE_TIME_ASSERT_HEADER(e) /*empty*/
  2000. #else
  2001. LZO_COMPILE_TIME_ASSERT_HEADER(1 == 1)
  2002. #if defined(__cplusplus)
  2003. extern "C" { LZO_COMPILE_TIME_ASSERT_HEADER(2 == 2) }
  2004. #endif
  2005. LZO_COMPILE_TIME_ASSERT_HEADER(3 == 3)
  2006. #endif
  2007. #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)
  2008. # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC)
  2009. # elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
  2010. # define __lzo_cdecl __cdecl
  2011. # define __lzo_cdecl_atexit /*empty*/
  2012. # define __lzo_cdecl_main __cdecl
  2013. # if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
  2014. # define __lzo_cdecl_qsort __pascal
  2015. # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
  2016. # define __lzo_cdecl_qsort _stdcall
  2017. # else
  2018. # define __lzo_cdecl_qsort __cdecl
  2019. # endif
  2020. # elif (LZO_CC_WATCOMC)
  2021. # define __lzo_cdecl __cdecl
  2022. # else
  2023. # define __lzo_cdecl __cdecl
  2024. # define __lzo_cdecl_atexit __cdecl
  2025. # define __lzo_cdecl_main __cdecl
  2026. # define __lzo_cdecl_qsort __cdecl
  2027. # endif
  2028. # if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC)
  2029. # elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
  2030. # define __lzo_cdecl_sighandler __pascal
  2031. # elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
  2032. # define __lzo_cdecl_sighandler _stdcall
  2033. # elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
  2034. # define __lzo_cdecl_sighandler __clrcall
  2035. # elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
  2036. # if defined(_DLL)
  2037. # define __lzo_cdecl_sighandler _far _cdecl _loadds
  2038. # elif defined(_MT)
  2039. # define __lzo_cdecl_sighandler _far _cdecl
  2040. # else
  2041. # define __lzo_cdecl_sighandler _cdecl
  2042. # endif
  2043. # else
  2044. # define __lzo_cdecl_sighandler __cdecl
  2045. # endif
  2046. #elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC)
  2047. # define __lzo_cdecl __cdecl
  2048. #elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC))
  2049. # define __lzo_cdecl cdecl
  2050. #endif
  2051. #if !defined(__lzo_cdecl)
  2052. # define __lzo_cdecl /*empty*/
  2053. #endif
  2054. #if !defined(__lzo_cdecl_atexit)
  2055. # define __lzo_cdecl_atexit /*empty*/
  2056. #endif
  2057. #if !defined(__lzo_cdecl_main)
  2058. # define __lzo_cdecl_main /*empty*/
  2059. #endif
  2060. #if !defined(__lzo_cdecl_qsort)
  2061. # define __lzo_cdecl_qsort /*empty*/
  2062. #endif
  2063. #if !defined(__lzo_cdecl_sighandler)
  2064. # define __lzo_cdecl_sighandler /*empty*/
  2065. #endif
  2066. #if !defined(__lzo_cdecl_va)
  2067. # define __lzo_cdecl_va __lzo_cdecl
  2068. #endif
  2069. #if !(LZO_CFG_NO_WINDOWS_H)
  2070. #if !defined(LZO_HAVE_WINDOWS_H)
  2071. #if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64)
  2072. # if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000))
  2073. # elif ((LZO_OS_WIN32 && defined(__PW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x030000ul)))
  2074. # elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul)))
  2075. # else
  2076. # define LZO_HAVE_WINDOWS_H 1
  2077. # endif
  2078. #endif
  2079. #endif
  2080. #endif
  2081. #define LZO_SIZEOF_CHAR 1
  2082. #ifndef LZO_SIZEOF_SHORT
  2083. #if defined(SIZEOF_SHORT)
  2084. # define LZO_SIZEOF_SHORT (SIZEOF_SHORT)
  2085. #elif defined(__SIZEOF_SHORT__)
  2086. # define LZO_SIZEOF_SHORT (__SIZEOF_SHORT__)
  2087. #endif
  2088. #endif
  2089. #ifndef LZO_SIZEOF_INT
  2090. #if defined(SIZEOF_INT)
  2091. # define LZO_SIZEOF_INT (SIZEOF_INT)
  2092. #elif defined(__SIZEOF_INT__)
  2093. # define LZO_SIZEOF_INT (__SIZEOF_INT__)
  2094. #endif
  2095. #endif
  2096. #ifndef LZO_SIZEOF_LONG
  2097. #if defined(SIZEOF_LONG)
  2098. # define LZO_SIZEOF_LONG (SIZEOF_LONG)
  2099. #elif defined(__SIZEOF_LONG__)
  2100. # define LZO_SIZEOF_LONG (__SIZEOF_LONG__)
  2101. #endif
  2102. #endif
  2103. #ifndef LZO_SIZEOF_LONG_LONG
  2104. #if defined(SIZEOF_LONG_LONG)
  2105. # define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
  2106. #elif defined(__SIZEOF_LONG_LONG__)
  2107. # define LZO_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__)
  2108. #endif
  2109. #endif
  2110. #ifndef LZO_SIZEOF___INT16
  2111. #if defined(SIZEOF___INT16)
  2112. # define LZO_SIZEOF___INT16 (SIZEOF___INT16)
  2113. #endif
  2114. #endif
  2115. #ifndef LZO_SIZEOF___INT32
  2116. #if defined(SIZEOF___INT32)
  2117. # define LZO_SIZEOF___INT32 (SIZEOF___INT32)
  2118. #endif
  2119. #endif
  2120. #ifndef LZO_SIZEOF___INT64
  2121. #if defined(SIZEOF___INT64)
  2122. # define LZO_SIZEOF___INT64 (SIZEOF___INT64)
  2123. #endif
  2124. #endif
  2125. #ifndef LZO_SIZEOF_VOID_P
  2126. #if defined(SIZEOF_VOID_P)
  2127. # define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P)
  2128. #elif defined(__SIZEOF_POINTER__)
  2129. # define LZO_SIZEOF_VOID_P (__SIZEOF_POINTER__)
  2130. #endif
  2131. #endif
  2132. #ifndef LZO_SIZEOF_SIZE_T
  2133. #if defined(SIZEOF_SIZE_T)
  2134. # define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
  2135. #elif defined(__SIZEOF_SIZE_T__)
  2136. # define LZO_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__)
  2137. #endif
  2138. #endif
  2139. #ifndef LZO_SIZEOF_PTRDIFF_T
  2140. #if defined(SIZEOF_PTRDIFF_T)
  2141. # define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
  2142. #elif defined(__SIZEOF_PTRDIFF_T__)
  2143. # define LZO_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__)
  2144. #endif
  2145. #endif
  2146. #define __LZO_LSR(x,b) (((x)+0ul) >> (b))
  2147. #if !defined(LZO_SIZEOF_SHORT)
  2148. # if (LZO_ARCH_CRAY_PVP)
  2149. # define LZO_SIZEOF_SHORT 8
  2150. # elif (USHRT_MAX == LZO_0xffffL)
  2151. # define LZO_SIZEOF_SHORT 2
  2152. # elif (__LZO_LSR(USHRT_MAX,7) == 1)
  2153. # define LZO_SIZEOF_SHORT 1
  2154. # elif (__LZO_LSR(USHRT_MAX,15) == 1)
  2155. # define LZO_SIZEOF_SHORT 2
  2156. # elif (__LZO_LSR(USHRT_MAX,31) == 1)
  2157. # define LZO_SIZEOF_SHORT 4
  2158. # elif (__LZO_LSR(USHRT_MAX,63) == 1)
  2159. # define LZO_SIZEOF_SHORT 8
  2160. # elif (__LZO_LSR(USHRT_MAX,127) == 1)
  2161. # define LZO_SIZEOF_SHORT 16
  2162. # else
  2163. # error "LZO_SIZEOF_SHORT"
  2164. # endif
  2165. #endif
  2166. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SHORT == sizeof(short))
  2167. #if !defined(LZO_SIZEOF_INT)
  2168. # if (LZO_ARCH_CRAY_PVP)
  2169. # define LZO_SIZEOF_INT 8
  2170. # elif (UINT_MAX == LZO_0xffffL)
  2171. # define LZO_SIZEOF_INT 2
  2172. # elif (UINT_MAX == LZO_0xffffffffL)
  2173. # define LZO_SIZEOF_INT 4
  2174. # elif (__LZO_LSR(UINT_MAX,7) == 1)
  2175. # define LZO_SIZEOF_INT 1
  2176. # elif (__LZO_LSR(UINT_MAX,15) == 1)
  2177. # define LZO_SIZEOF_INT 2
  2178. # elif (__LZO_LSR(UINT_MAX,31) == 1)
  2179. # define LZO_SIZEOF_INT 4
  2180. # elif (__LZO_LSR(UINT_MAX,63) == 1)
  2181. # define LZO_SIZEOF_INT 8
  2182. # elif (__LZO_LSR(UINT_MAX,127) == 1)
  2183. # define LZO_SIZEOF_INT 16
  2184. # else
  2185. # error "LZO_SIZEOF_INT"
  2186. # endif
  2187. #endif
  2188. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_INT == sizeof(int))
  2189. #if !defined(LZO_SIZEOF_LONG)
  2190. # if (ULONG_MAX == LZO_0xffffffffL)
  2191. # define LZO_SIZEOF_LONG 4
  2192. # elif (__LZO_LSR(ULONG_MAX,7) == 1)
  2193. # define LZO_SIZEOF_LONG 1
  2194. # elif (__LZO_LSR(ULONG_MAX,15) == 1)
  2195. # define LZO_SIZEOF_LONG 2
  2196. # elif (__LZO_LSR(ULONG_MAX,31) == 1)
  2197. # define LZO_SIZEOF_LONG 4
  2198. # elif (__LZO_LSR(ULONG_MAX,39) == 1)
  2199. # define LZO_SIZEOF_LONG 5
  2200. # elif (__LZO_LSR(ULONG_MAX,63) == 1)
  2201. # define LZO_SIZEOF_LONG 8
  2202. # elif (__LZO_LSR(ULONG_MAX,127) == 1)
  2203. # define LZO_SIZEOF_LONG 16
  2204. # else
  2205. # error "LZO_SIZEOF_LONG"
  2206. # endif
  2207. #endif
  2208. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_LONG == sizeof(long))
  2209. #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
  2210. #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
  2211. # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
  2212. # if (LZO_CC_GNUC >= 0x030300ul)
  2213. # if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0))
  2214. # define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG
  2215. # elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1)
  2216. # define LZO_SIZEOF_LONG_LONG 4
  2217. # endif
  2218. # endif
  2219. # endif
  2220. #endif
  2221. #endif
  2222. #if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
  2223. #if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
  2224. #if (LZO_ARCH_I086 && LZO_CC_DMC)
  2225. #elif (LZO_CC_CILLY) && defined(__GNUC__)
  2226. # define LZO_SIZEOF_LONG_LONG 8
  2227. #elif (LZO_CC_ARMCC_GNUC || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
  2228. # define LZO_SIZEOF_LONG_LONG 8
  2229. #elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400))
  2230. # define LZO_SIZEOF_LONG_LONG 8
  2231. #elif (LZO_OS_WIN64 || defined(_WIN64))
  2232. # define LZO_SIZEOF___INT64 8
  2233. #elif (LZO_ARCH_I386 && (LZO_CC_DMC))
  2234. # define LZO_SIZEOF_LONG_LONG 8
  2235. #elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700)))
  2236. # define LZO_SIZEOF_LONG_LONG 8
  2237. #elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__)))
  2238. # define LZO_SIZEOF_LONG_LONG 8
  2239. #elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC))
  2240. # define LZO_SIZEOF_LONG_LONG 8
  2241. #elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC))
  2242. # define LZO_SIZEOF___INT64 8
  2243. #elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC))
  2244. # define LZO_SIZEOF___INT64 8
  2245. #elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
  2246. # define LZO_SIZEOF___INT64 8
  2247. #elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100)))
  2248. # define LZO_SIZEOF___INT64 8
  2249. #elif (LZO_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64))
  2250. # define LZO_SIZEOF_LONG_LONG 8
  2251. #elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64))
  2252. # define LZO_SIZEOF___INT64 8
  2253. #elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
  2254. # define LZO_SIZEOF_LONG_LONG 8
  2255. #elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64)
  2256. # define LZO_SIZEOF_LONG_LONG 8
  2257. #elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2)
  2258. #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
  2259. # define LZO_SIZEOF_LONG_LONG 8
  2260. #endif
  2261. #endif
  2262. #endif
  2263. #if defined(__cplusplus) && (LZO_CC_GNUC)
  2264. # if (LZO_CC_GNUC < 0x020800ul)
  2265. # undef LZO_SIZEOF_LONG_LONG
  2266. # endif
  2267. #endif
  2268. #if (LZO_CFG_NO_LONG_LONG)
  2269. # undef LZO_SIZEOF_LONG_LONG
  2270. #elif defined(__NO_LONG_LONG)
  2271. # undef LZO_SIZEOF_LONG_LONG
  2272. #elif defined(_NO_LONGLONG)
  2273. # undef LZO_SIZEOF_LONG_LONG
  2274. #endif
  2275. #if !defined(LZO_WORDSIZE)
  2276. #if (LZO_ARCH_ALPHA)
  2277. # define LZO_WORDSIZE 8
  2278. #elif (LZO_ARCH_AMD64)
  2279. # define LZO_WORDSIZE 8
  2280. #elif (LZO_ARCH_ARM64)
  2281. # define LZO_WORDSIZE 8
  2282. #elif (LZO_ARCH_AVR)
  2283. # define LZO_WORDSIZE 1
  2284. #elif (LZO_ARCH_H8300)
  2285. # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
  2286. # define LZO_WORDSIZE 4
  2287. # else
  2288. # define LZO_WORDSIZE 2
  2289. # endif
  2290. #elif (LZO_ARCH_I086)
  2291. # define LZO_WORDSIZE 2
  2292. #elif (LZO_ARCH_IA64)
  2293. # define LZO_WORDSIZE 8
  2294. #elif (LZO_ARCH_M16C)
  2295. # define LZO_WORDSIZE 2
  2296. #elif (LZO_ARCH_SPU)
  2297. # define LZO_WORDSIZE 4
  2298. #elif (LZO_ARCH_Z80)
  2299. # define LZO_WORDSIZE 1
  2300. #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
  2301. # define LZO_WORDSIZE 8
  2302. #elif (LZO_OS_OS400 || defined(__OS400__))
  2303. # define LZO_WORDSIZE 8
  2304. #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
  2305. # define LZO_WORDSIZE 8
  2306. #endif
  2307. #endif
  2308. #if !defined(LZO_SIZEOF_VOID_P)
  2309. #if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32)
  2310. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
  2311. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
  2312. # define LZO_SIZEOF_VOID_P 4
  2313. #elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64)
  2314. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8)
  2315. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
  2316. # define LZO_SIZEOF_VOID_P 8
  2317. #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
  2318. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
  2319. # define LZO_SIZEOF_VOID_P 8
  2320. #elif defined(__LP64__) || defined(__LP64) || defined(_LP64)
  2321. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
  2322. # define LZO_SIZEOF_VOID_P 8
  2323. #elif (LZO_ARCH_AVR)
  2324. # define LZO_SIZEOF_VOID_P 2
  2325. #elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430)
  2326. # define LZO_SIZEOF_VOID_P 2
  2327. #elif (LZO_ARCH_H8300)
  2328. # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
  2329. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_WORDSIZE == 4)
  2330. # if defined(__NORMAL_MODE__)
  2331. # define LZO_SIZEOF_VOID_P 2
  2332. # else
  2333. # define LZO_SIZEOF_VOID_P 4
  2334. # endif
  2335. # else
  2336. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_WORDSIZE == 2)
  2337. # define LZO_SIZEOF_VOID_P 2
  2338. # endif
  2339. # if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4)
  2340. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT
  2341. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT
  2342. # endif
  2343. #elif (LZO_ARCH_I086)
  2344. # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM)
  2345. # define LZO_SIZEOF_VOID_P 2
  2346. # elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE)
  2347. # define LZO_SIZEOF_VOID_P 4
  2348. # else
  2349. # error "invalid LZO_ARCH_I086 memory model"
  2350. # endif
  2351. #elif (LZO_ARCH_M16C)
  2352. # if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
  2353. # define LZO_SIZEOF_VOID_P 4
  2354. # else
  2355. # define LZO_SIZEOF_VOID_P 2
  2356. # endif
  2357. #elif (LZO_ARCH_SPU)
  2358. # define LZO_SIZEOF_VOID_P 4
  2359. #elif (LZO_ARCH_Z80)
  2360. # define LZO_SIZEOF_VOID_P 2
  2361. #elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
  2362. # define LZO_SIZEOF_VOID_P 4
  2363. #elif (LZO_OS_OS400 || defined(__OS400__))
  2364. # if defined(__LLP64_IFC__)
  2365. # define LZO_SIZEOF_VOID_P 8
  2366. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
  2367. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
  2368. # else
  2369. # define LZO_SIZEOF_VOID_P 16
  2370. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
  2371. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
  2372. # endif
  2373. #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
  2374. # define LZO_SIZEOF_VOID_P 8
  2375. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
  2376. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
  2377. #endif
  2378. #endif
  2379. #if !defined(LZO_SIZEOF_VOID_P)
  2380. # define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
  2381. #endif
  2382. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_VOID_P == sizeof(void *))
  2383. #if !defined(LZO_SIZEOF_SIZE_T)
  2384. #if (LZO_ARCH_I086 || LZO_ARCH_M16C)
  2385. # define LZO_SIZEOF_SIZE_T 2
  2386. #endif
  2387. #endif
  2388. #if !defined(LZO_SIZEOF_SIZE_T)
  2389. # define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P
  2390. #endif
  2391. #if defined(offsetof)
  2392. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_SIZE_T == sizeof(size_t))
  2393. #endif
  2394. #if !defined(LZO_SIZEOF_PTRDIFF_T)
  2395. #if (LZO_ARCH_I086)
  2396. # if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE)
  2397. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P
  2398. # elif (LZO_MM_COMPACT || LZO_MM_LARGE)
  2399. # if (LZO_CC_BORLANDC || LZO_CC_TURBOC)
  2400. # define LZO_SIZEOF_PTRDIFF_T 4
  2401. # else
  2402. # define LZO_SIZEOF_PTRDIFF_T 2
  2403. # endif
  2404. # else
  2405. # error "invalid LZO_ARCH_I086 memory model"
  2406. # endif
  2407. #endif
  2408. #endif
  2409. #if !defined(LZO_SIZEOF_PTRDIFF_T)
  2410. # define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T
  2411. #endif
  2412. #if defined(offsetof)
  2413. LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
  2414. #endif
  2415. #if !defined(LZO_WORDSIZE)
  2416. # define LZO_WORDSIZE LZO_SIZEOF_VOID_P
  2417. #endif
  2418. #if (LZO_ABI_NEUTRAL_ENDIAN)
  2419. # undef LZO_ABI_BIG_ENDIAN
  2420. # undef LZO_ABI_LITTLE_ENDIAN
  2421. #elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN)
  2422. #if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP)
  2423. # define LZO_ABI_BIG_ENDIAN 1
  2424. #elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64)
  2425. # define LZO_ABI_LITTLE_ENDIAN 1
  2426. #elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430 || LZO_ARCH_RISCV)
  2427. # define LZO_ABI_LITTLE_ENDIAN 1
  2428. #elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390 || LZO_ARCH_SPU)
  2429. # define LZO_ABI_BIG_ENDIAN 1
  2430. #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
  2431. # if (__LITTLE_ENDIAN__ == 1)
  2432. # define LZO_ABI_LITTLE_ENDIAN 1
  2433. # else
  2434. # define LZO_ABI_BIG_ENDIAN 1
  2435. # endif
  2436. #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
  2437. # define LZO_ABI_BIG_ENDIAN 1
  2438. #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
  2439. # define LZO_ABI_LITTLE_ENDIAN 1
  2440. #elif 1 && (LZO_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0)
  2441. # define LZO_ABI_BIG_ENDIAN 1
  2442. #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
  2443. # define LZO_ABI_BIG_ENDIAN 1
  2444. #elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
  2445. # define LZO_ABI_LITTLE_ENDIAN 1
  2446. #elif 1 && (LZO_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32)
  2447. # define LZO_ABI_LITTLE_ENDIAN 1
  2448. #elif 1 && (LZO_ARCH_ARM && LZO_CC_ARMCC_ARMCC)
  2449. # if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
  2450. # error "unexpected configuration - check your compiler defines"
  2451. # elif defined(__BIG_ENDIAN)
  2452. # define LZO_ABI_BIG_ENDIAN 1
  2453. # else
  2454. # define LZO_ABI_LITTLE_ENDIAN 1
  2455. # endif
  2456. # define LZO_ABI_LITTLE_ENDIAN 1
  2457. #elif 1 && (LZO_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0)
  2458. # define LZO_ABI_BIG_ENDIAN 1
  2459. #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__)
  2460. # define LZO_ABI_BIG_ENDIAN 1
  2461. #elif 1 && (LZO_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__)
  2462. # define LZO_ABI_LITTLE_ENDIAN 1
  2463. #elif 1 && (LZO_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32)
  2464. # define LZO_ABI_LITTLE_ENDIAN 1
  2465. #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
  2466. # define LZO_ABI_BIG_ENDIAN 1
  2467. #elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
  2468. # define LZO_ABI_LITTLE_ENDIAN 1
  2469. #endif
  2470. #endif
  2471. #if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN)
  2472. # error "unexpected configuration - check your compiler defines"
  2473. #endif
  2474. #if (LZO_ABI_BIG_ENDIAN)
  2475. # define LZO_INFO_ABI_ENDIAN "be"
  2476. #elif (LZO_ABI_LITTLE_ENDIAN)
  2477. # define LZO_INFO_ABI_ENDIAN "le"
  2478. #elif (LZO_ABI_NEUTRAL_ENDIAN)
  2479. # define LZO_INFO_ABI_ENDIAN "neutral"
  2480. #endif
  2481. #if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
  2482. # define LZO_ABI_I8LP16 1
  2483. # define LZO_INFO_ABI_PM "i8lp16"
  2484. #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
  2485. # define LZO_ABI_ILP16 1
  2486. # define LZO_INFO_ABI_PM "ilp16"
  2487. #elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
  2488. # define LZO_ABI_LP32 1
  2489. # define LZO_INFO_ABI_PM "lp32"
  2490. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
  2491. # define LZO_ABI_ILP32 1
  2492. # define LZO_INFO_ABI_PM "ilp32"
  2493. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8)
  2494. # define LZO_ABI_LLP64 1
  2495. # define LZO_INFO_ABI_PM "llp64"
  2496. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
  2497. # define LZO_ABI_LP64 1
  2498. # define LZO_INFO_ABI_PM "lp64"
  2499. #elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
  2500. # define LZO_ABI_ILP64 1
  2501. # define LZO_INFO_ABI_PM "ilp64"
  2502. #elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4)
  2503. # define LZO_ABI_IP32L64 1
  2504. # define LZO_INFO_ABI_PM "ip32l64"
  2505. #endif
  2506. #if (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_VOID_P == 4 && LZO_WORDSIZE == 8)
  2507. # define LZO_ABI_IP32W64 1
  2508. # ifndef LZO_INFO_ABI_PM
  2509. # define LZO_INFO_ABI_PM "ip32w64"
  2510. # endif
  2511. #endif
  2512. #if 0
  2513. #elif !defined(__LZO_LIBC_OVERRIDE)
  2514. #if (LZO_LIBC_NAKED)
  2515. # define LZO_INFO_LIBC "naked"
  2516. #elif (LZO_LIBC_FREESTANDING)
  2517. # define LZO_INFO_LIBC "freestanding"
  2518. #elif (LZO_LIBC_MOSTLY_FREESTANDING)
  2519. # define LZO_INFO_LIBC "mfreestanding"
  2520. #elif (LZO_LIBC_ISOC90)
  2521. # define LZO_INFO_LIBC "isoc90"
  2522. #elif (LZO_LIBC_ISOC99)
  2523. # define LZO_INFO_LIBC "isoc99"
  2524. #elif (LZO_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION)
  2525. # define LZO_LIBC_ISOC90 1
  2526. # define LZO_INFO_LIBC "isoc90"
  2527. #elif defined(__dietlibc__)
  2528. # define LZO_LIBC_DIETLIBC 1
  2529. # define LZO_INFO_LIBC "dietlibc"
  2530. #elif defined(_NEWLIB_VERSION)
  2531. # define LZO_LIBC_NEWLIB 1
  2532. # define LZO_INFO_LIBC "newlib"
  2533. #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
  2534. # if defined(__UCLIBC_SUBLEVEL__)
  2535. # define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0))
  2536. # else
  2537. # define LZO_LIBC_UCLIBC 0x00090bL
  2538. # endif
  2539. # define LZO_INFO_LIBC "uc" "libc"
  2540. #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
  2541. # define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100)
  2542. # define LZO_INFO_LIBC "glibc"
  2543. #elif (LZO_CC_MWERKS) && defined(__MSL__)
  2544. # define LZO_LIBC_MSL __MSL__
  2545. # define LZO_INFO_LIBC "msl"
  2546. #elif 1 && defined(__IAR_SYSTEMS_ICC__)
  2547. # define LZO_LIBC_ISOC90 1
  2548. # define LZO_INFO_LIBC "isoc90"
  2549. #else
  2550. # define LZO_LIBC_DEFAULT 1
  2551. # define LZO_INFO_LIBC "default"
  2552. #endif
  2553. #endif
  2554. #if (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
  2555. # define LZO_ASM_SYNTAX_MSC 1
  2556. #elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
  2557. #elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul))
  2558. #elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
  2559. # define LZO_ASM_SYNTAX_GNUC 1
  2560. #elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
  2561. # define LZO_ASM_SYNTAX_GNUC 1
  2562. #elif (LZO_CC_GNUC)
  2563. # define LZO_ASM_SYNTAX_GNUC 1
  2564. #endif
  2565. #if (LZO_ASM_SYNTAX_GNUC)
  2566. #if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul))
  2567. # define __LZO_ASM_CLOBBER "ax"
  2568. # define __LZO_ASM_CLOBBER_LIST_CC /*empty*/
  2569. # define __LZO_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/
  2570. # define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/
  2571. #elif (LZO_CC_INTELC && (__INTEL_COMPILER < 1000))
  2572. # define __LZO_ASM_CLOBBER "memory"
  2573. # define __LZO_ASM_CLOBBER_LIST_CC /*empty*/
  2574. # define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "memory"
  2575. # define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/
  2576. #else
  2577. # define __LZO_ASM_CLOBBER "cc", "memory"
  2578. # define __LZO_ASM_CLOBBER_LIST_CC : "cc"
  2579. # define __LZO_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory"
  2580. # define __LZO_ASM_CLOBBER_LIST_EMPTY /*empty*/
  2581. #endif
  2582. #endif
  2583. #if (LZO_ARCH_ALPHA)
  2584. # define LZO_OPT_AVOID_UINT_INDEX 1
  2585. #elif (LZO_ARCH_AMD64)
  2586. # define LZO_OPT_AVOID_INT_INDEX 1
  2587. # define LZO_OPT_AVOID_UINT_INDEX 1
  2588. # ifndef LZO_OPT_UNALIGNED16
  2589. # define LZO_OPT_UNALIGNED16 1
  2590. # endif
  2591. # ifndef LZO_OPT_UNALIGNED32
  2592. # define LZO_OPT_UNALIGNED32 1
  2593. # endif
  2594. # ifndef LZO_OPT_UNALIGNED64
  2595. # define LZO_OPT_UNALIGNED64 1
  2596. # endif
  2597. #elif (LZO_ARCH_ARM)
  2598. # if defined(__ARM_FEATURE_UNALIGNED)
  2599. # if ((__ARM_FEATURE_UNALIGNED)+0)
  2600. # ifndef LZO_OPT_UNALIGNED16
  2601. # define LZO_OPT_UNALIGNED16 1
  2602. # endif
  2603. # ifndef LZO_OPT_UNALIGNED32
  2604. # define LZO_OPT_UNALIGNED32 1
  2605. # endif
  2606. # endif
  2607. # elif 1 && (LZO_ARCH_ARM_THUMB2)
  2608. # ifndef LZO_OPT_UNALIGNED16
  2609. # define LZO_OPT_UNALIGNED16 1
  2610. # endif
  2611. # ifndef LZO_OPT_UNALIGNED32
  2612. # define LZO_OPT_UNALIGNED32 1
  2613. # endif
  2614. # elif 1 && defined(__ARM_ARCH) && ((__ARM_ARCH)+0 >= 7)
  2615. # ifndef LZO_OPT_UNALIGNED16
  2616. # define LZO_OPT_UNALIGNED16 1
  2617. # endif
  2618. # ifndef LZO_OPT_UNALIGNED32
  2619. # define LZO_OPT_UNALIGNED32 1
  2620. # endif
  2621. # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7)
  2622. # ifndef LZO_OPT_UNALIGNED16
  2623. # define LZO_OPT_UNALIGNED16 1
  2624. # endif
  2625. # ifndef LZO_OPT_UNALIGNED32
  2626. # define LZO_OPT_UNALIGNED32 1
  2627. # endif
  2628. # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R))
  2629. # ifndef LZO_OPT_UNALIGNED16
  2630. # define LZO_OPT_UNALIGNED16 1
  2631. # endif
  2632. # ifndef LZO_OPT_UNALIGNED32
  2633. # define LZO_OPT_UNALIGNED32 1
  2634. # endif
  2635. # elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7)
  2636. # ifndef LZO_OPT_UNALIGNED16
  2637. # define LZO_OPT_UNALIGNED16 1
  2638. # endif
  2639. # ifndef LZO_OPT_UNALIGNED32
  2640. # define LZO_OPT_UNALIGNED32 1
  2641. # endif
  2642. # endif
  2643. #elif (LZO_ARCH_ARM64)
  2644. # ifndef LZO_OPT_UNALIGNED16
  2645. # define LZO_OPT_UNALIGNED16 1
  2646. # endif
  2647. # ifndef LZO_OPT_UNALIGNED32
  2648. # define LZO_OPT_UNALIGNED32 1
  2649. # endif
  2650. # ifndef LZO_OPT_UNALIGNED64
  2651. # define LZO_OPT_UNALIGNED64 1
  2652. # endif
  2653. #elif (LZO_ARCH_CRIS)
  2654. # ifndef LZO_OPT_UNALIGNED16
  2655. # define LZO_OPT_UNALIGNED16 1
  2656. # endif
  2657. # ifndef LZO_OPT_UNALIGNED32
  2658. # define LZO_OPT_UNALIGNED32 1
  2659. # endif
  2660. #elif (LZO_ARCH_I386)
  2661. # ifndef LZO_OPT_UNALIGNED16
  2662. # define LZO_OPT_UNALIGNED16 1
  2663. # endif
  2664. # ifndef LZO_OPT_UNALIGNED32
  2665. # define LZO_OPT_UNALIGNED32 1
  2666. # endif
  2667. #elif (LZO_ARCH_IA64)
  2668. # define LZO_OPT_AVOID_INT_INDEX 1
  2669. # define LZO_OPT_AVOID_UINT_INDEX 1
  2670. # define LZO_OPT_PREFER_POSTINC 1
  2671. #elif (LZO_ARCH_M68K)
  2672. # define LZO_OPT_PREFER_POSTINC 1
  2673. # define LZO_OPT_PREFER_PREDEC 1
  2674. # if defined(__mc68020__) && !defined(__mcoldfire__)
  2675. # ifndef LZO_OPT_UNALIGNED16
  2676. # define LZO_OPT_UNALIGNED16 1
  2677. # endif
  2678. # ifndef LZO_OPT_UNALIGNED32
  2679. # define LZO_OPT_UNALIGNED32 1
  2680. # endif
  2681. # endif
  2682. #elif (LZO_ARCH_MIPS)
  2683. # define LZO_OPT_AVOID_UINT_INDEX 1
  2684. #elif (LZO_ARCH_POWERPC)
  2685. # define LZO_OPT_PREFER_PREINC 1
  2686. # define LZO_OPT_PREFER_PREDEC 1
  2687. # if (LZO_ABI_BIG_ENDIAN) || (LZO_WORDSIZE == 8)
  2688. # ifndef LZO_OPT_UNALIGNED16
  2689. # define LZO_OPT_UNALIGNED16 1
  2690. # endif
  2691. # ifndef LZO_OPT_UNALIGNED32
  2692. # define LZO_OPT_UNALIGNED32 1
  2693. # endif
  2694. # if (LZO_WORDSIZE == 8)
  2695. # ifndef LZO_OPT_UNALIGNED64
  2696. # define LZO_OPT_UNALIGNED64 1
  2697. # endif
  2698. # endif
  2699. # endif
  2700. #elif (LZO_ARCH_RISCV)
  2701. # define LZO_OPT_AVOID_UINT_INDEX 1
  2702. # ifndef LZO_OPT_UNALIGNED16
  2703. # define LZO_OPT_UNALIGNED16 1
  2704. # endif
  2705. # ifndef LZO_OPT_UNALIGNED32
  2706. # define LZO_OPT_UNALIGNED32 1
  2707. # endif
  2708. # if (LZO_WORDSIZE == 8)
  2709. # ifndef LZO_OPT_UNALIGNED64
  2710. # define LZO_OPT_UNALIGNED64 1
  2711. # endif
  2712. # endif
  2713. #elif (LZO_ARCH_S390)
  2714. # ifndef LZO_OPT_UNALIGNED16
  2715. # define LZO_OPT_UNALIGNED16 1
  2716. # endif
  2717. # ifndef LZO_OPT_UNALIGNED32
  2718. # define LZO_OPT_UNALIGNED32 1
  2719. # endif
  2720. # if (LZO_WORDSIZE == 8)
  2721. # ifndef LZO_OPT_UNALIGNED64
  2722. # define LZO_OPT_UNALIGNED64 1
  2723. # endif
  2724. # endif
  2725. #elif (LZO_ARCH_SH)
  2726. # define LZO_OPT_PREFER_POSTINC 1
  2727. # define LZO_OPT_PREFER_PREDEC 1
  2728. #endif
  2729. #ifndef LZO_CFG_NO_INLINE_ASM
  2730. #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC)
  2731. # define LZO_CFG_NO_INLINE_ASM 1
  2732. #elif (LZO_CC_LLVM)
  2733. # define LZO_CFG_NO_INLINE_ASM 1
  2734. #endif
  2735. #endif
  2736. #if (LZO_CFG_NO_INLINE_ASM)
  2737. # undef LZO_ASM_SYNTAX_MSC
  2738. # undef LZO_ASM_SYNTAX_GNUC
  2739. # undef __LZO_ASM_CLOBBER
  2740. # undef __LZO_ASM_CLOBBER_LIST_CC
  2741. # undef __LZO_ASM_CLOBBER_LIST_CC_MEMORY
  2742. # undef __LZO_ASM_CLOBBER_LIST_EMPTY
  2743. #endif
  2744. #ifndef LZO_CFG_NO_UNALIGNED
  2745. #if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC)
  2746. # define LZO_CFG_NO_UNALIGNED 1
  2747. #endif
  2748. #endif
  2749. #if (LZO_CFG_NO_UNALIGNED)
  2750. # undef LZO_OPT_UNALIGNED16
  2751. # undef LZO_OPT_UNALIGNED32
  2752. # undef LZO_OPT_UNALIGNED64
  2753. #endif
  2754. #if defined(__LZO_INFOSTR_MM)
  2755. #elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM))
  2756. # define __LZO_INFOSTR_MM ""
  2757. #elif defined(LZO_INFO_MM)
  2758. # define __LZO_INFOSTR_MM "." LZO_INFO_MM
  2759. #else
  2760. # define __LZO_INFOSTR_MM ""
  2761. #endif
  2762. #if defined(__LZO_INFOSTR_PM)
  2763. #elif defined(LZO_INFO_ABI_PM)
  2764. # define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM
  2765. #else
  2766. # define __LZO_INFOSTR_PM ""
  2767. #endif
  2768. #if defined(__LZO_INFOSTR_ENDIAN)
  2769. #elif defined(LZO_INFO_ABI_ENDIAN)
  2770. # define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN
  2771. #else
  2772. # define __LZO_INFOSTR_ENDIAN ""
  2773. #endif
  2774. #if defined(__LZO_INFOSTR_OSNAME)
  2775. #elif defined(LZO_INFO_OS_CONSOLE)
  2776. # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE
  2777. #elif defined(LZO_INFO_OS_POSIX)
  2778. # define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX
  2779. #else
  2780. # define __LZO_INFOSTR_OSNAME LZO_INFO_OS
  2781. #endif
  2782. #if defined(__LZO_INFOSTR_LIBC)
  2783. #elif defined(LZO_INFO_LIBC)
  2784. # define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC
  2785. #else
  2786. # define __LZO_INFOSTR_LIBC ""
  2787. #endif
  2788. #if defined(__LZO_INFOSTR_CCVER)
  2789. #elif defined(LZO_INFO_CCVER)
  2790. # define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER
  2791. #else
  2792. # define __LZO_INFOSTR_CCVER ""
  2793. #endif
  2794. #define LZO_INFO_STRING \
  2795. LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \
  2796. " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER
  2797. #if !(LZO_CFG_SKIP_LZO_TYPES)
  2798. #if (!(LZO_SIZEOF_SHORT+0 > 0 && LZO_SIZEOF_INT+0 > 0 && LZO_SIZEOF_LONG+0 > 0))
  2799. # error "missing defines for sizes"
  2800. #endif
  2801. #if (!(LZO_SIZEOF_PTRDIFF_T+0 > 0 && LZO_SIZEOF_SIZE_T+0 > 0 && LZO_SIZEOF_VOID_P+0 > 0))
  2802. # error "missing defines for sizes"
  2803. #endif
  2804. #define LZO_TYPEOF_CHAR 1u
  2805. #define LZO_TYPEOF_SHORT 2u
  2806. #define LZO_TYPEOF_INT 3u
  2807. #define LZO_TYPEOF_LONG 4u
  2808. #define LZO_TYPEOF_LONG_LONG 5u
  2809. #define LZO_TYPEOF___INT8 17u
  2810. #define LZO_TYPEOF___INT16 18u
  2811. #define LZO_TYPEOF___INT32 19u
  2812. #define LZO_TYPEOF___INT64 20u
  2813. #define LZO_TYPEOF___INT128 21u
  2814. #define LZO_TYPEOF___INT256 22u
  2815. #define LZO_TYPEOF___MODE_QI 33u
  2816. #define LZO_TYPEOF___MODE_HI 34u
  2817. #define LZO_TYPEOF___MODE_SI 35u
  2818. #define LZO_TYPEOF___MODE_DI 36u
  2819. #define LZO_TYPEOF___MODE_TI 37u
  2820. #define LZO_TYPEOF_CHAR_P 129u
  2821. #if !defined(lzo_llong_t)
  2822. #if (LZO_SIZEOF_LONG_LONG+0 > 0)
  2823. # if !(LZO_LANG_ASSEMBLER)
  2824. __lzo_gnuc_extension__ typedef long long lzo_llong_t__;
  2825. __lzo_gnuc_extension__ typedef unsigned long long lzo_ullong_t__;
  2826. # endif
  2827. # define lzo_llong_t lzo_llong_t__
  2828. # define lzo_ullong_t lzo_ullong_t__
  2829. #endif
  2830. #endif
  2831. #if !defined(lzo_int16e_t)
  2832. #if (LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT) && (LZO_SIZEOF_SHORT != 2)
  2833. # undef LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T
  2834. #endif
  2835. #if (LZO_SIZEOF_LONG == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT)
  2836. # define lzo_int16e_t long
  2837. # define lzo_uint16e_t unsigned long
  2838. # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG
  2839. #elif (LZO_SIZEOF_INT == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT)
  2840. # define lzo_int16e_t int
  2841. # define lzo_uint16e_t unsigned int
  2842. # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT
  2843. #elif (LZO_SIZEOF_SHORT == 2)
  2844. # define lzo_int16e_t short int
  2845. # define lzo_uint16e_t unsigned short int
  2846. # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_SHORT
  2847. #elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM)
  2848. # if !(LZO_LANG_ASSEMBLER)
  2849. typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__)));
  2850. typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
  2851. # endif
  2852. # define lzo_int16e_t lzo_int16e_hi_t__
  2853. # define lzo_uint16e_t lzo_uint16e_hi_t__
  2854. # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI
  2855. #elif (LZO_SIZEOF___INT16 == 2)
  2856. # define lzo_int16e_t __int16
  2857. # define lzo_uint16e_t unsigned __int16
  2858. # define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16
  2859. #else
  2860. #endif
  2861. #endif
  2862. #if defined(lzo_int16e_t)
  2863. # define LZO_SIZEOF_LZO_INT16E_T 2
  2864. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == 2)
  2865. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16e_t) == LZO_SIZEOF_LZO_INT16E_T)
  2866. #endif
  2867. #if !defined(lzo_int32e_t)
  2868. #if (LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T == LZO_TYPEOF_INT) && (LZO_SIZEOF_INT != 4)
  2869. # undef LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T
  2870. #endif
  2871. #if (LZO_SIZEOF_LONG == 4) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT32E_T == LZO_TYPEOF_INT)
  2872. # define lzo_int32e_t long int
  2873. # define lzo_uint32e_t unsigned long int
  2874. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG
  2875. #elif (LZO_SIZEOF_INT == 4)
  2876. # define lzo_int32e_t int
  2877. # define lzo_uint32e_t unsigned int
  2878. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT
  2879. #elif (LZO_SIZEOF_SHORT == 4)
  2880. # define lzo_int32e_t short int
  2881. # define lzo_uint32e_t unsigned short int
  2882. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_SHORT
  2883. #elif (LZO_SIZEOF_LONG_LONG == 4)
  2884. # define lzo_int32e_t lzo_llong_t
  2885. # define lzo_uint32e_t lzo_ullong_t
  2886. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG_LONG
  2887. #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
  2888. # if !(LZO_LANG_ASSEMBLER)
  2889. typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__)));
  2890. typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__)));
  2891. # endif
  2892. # define lzo_int32e_t lzo_int32e_si_t__
  2893. # define lzo_uint32e_t lzo_uint32e_si_t__
  2894. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI
  2895. #elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
  2896. # if !(LZO_LANG_ASSEMBLER)
  2897. typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__)));
  2898. typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__)));
  2899. # endif
  2900. # define lzo_int32e_t lzo_int32e_si_t__
  2901. # define lzo_uint32e_t lzo_uint32e_si_t__
  2902. # define LZO_INT32_C(c) (c##LL)
  2903. # define LZO_UINT32_C(c) (c##ULL)
  2904. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI
  2905. #elif (LZO_SIZEOF___INT32 == 4)
  2906. # define lzo_int32e_t __int32
  2907. # define lzo_uint32e_t unsigned __int32
  2908. # define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32
  2909. #else
  2910. #endif
  2911. #endif
  2912. #if defined(lzo_int32e_t)
  2913. # define LZO_SIZEOF_LZO_INT32E_T 4
  2914. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == 4)
  2915. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32e_t) == LZO_SIZEOF_LZO_INT32E_T)
  2916. #endif
  2917. #if !defined(lzo_int64e_t)
  2918. #if (LZO_SIZEOF___INT64 == 8)
  2919. # if (LZO_CC_BORLANDC) && !defined(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T)
  2920. # define LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T LZO_TYPEOF___INT64
  2921. # endif
  2922. #endif
  2923. #if (LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && (LZO_SIZEOF_LONG_LONG != 8)
  2924. # undef LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T
  2925. #endif
  2926. #if (LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64) && (LZO_SIZEOF___INT64 != 8)
  2927. # undef LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T
  2928. #endif
  2929. #if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG)
  2930. # define lzo_int64e_t int
  2931. # define lzo_uint64e_t unsigned int
  2932. # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT
  2933. #elif (LZO_SIZEOF_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64)
  2934. # define lzo_int64e_t long int
  2935. # define lzo_uint64e_t unsigned long int
  2936. # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG
  2937. #elif (LZO_SIZEOF_LONG_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64)
  2938. # define lzo_int64e_t lzo_llong_t
  2939. # define lzo_uint64e_t lzo_ullong_t
  2940. # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_LONG_LONG
  2941. # if (LZO_CC_BORLANDC)
  2942. # define LZO_INT64_C(c) ((c) + 0ll)
  2943. # define LZO_UINT64_C(c) ((c) + 0ull)
  2944. # elif 0
  2945. # define LZO_INT64_C(c) (__lzo_gnuc_extension__ (c##LL))
  2946. # define LZO_UINT64_C(c) (__lzo_gnuc_extension__ (c##ULL))
  2947. # else
  2948. # define LZO_INT64_C(c) (c##LL)
  2949. # define LZO_UINT64_C(c) (c##ULL)
  2950. # endif
  2951. #elif (LZO_SIZEOF___INT64 == 8)
  2952. # define lzo_int64e_t __int64
  2953. # define lzo_uint64e_t unsigned __int64
  2954. # define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF___INT64
  2955. # if (LZO_CC_BORLANDC)
  2956. # define LZO_INT64_C(c) ((c) + 0i64)
  2957. # define LZO_UINT64_C(c) ((c) + 0ui64)
  2958. # else
  2959. # define LZO_INT64_C(c) (c##i64)
  2960. # define LZO_UINT64_C(c) (c##ui64)
  2961. # endif
  2962. #else
  2963. #endif
  2964. #endif
  2965. #if defined(lzo_int64e_t)
  2966. # define LZO_SIZEOF_LZO_INT64E_T 8
  2967. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == 8)
  2968. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64e_t) == LZO_SIZEOF_LZO_INT64E_T)
  2969. #endif
  2970. #if !defined(lzo_int32l_t)
  2971. #if defined(lzo_int32e_t)
  2972. # define lzo_int32l_t lzo_int32e_t
  2973. # define lzo_uint32l_t lzo_uint32e_t
  2974. # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LZO_INT32E_T
  2975. # define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T
  2976. #elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG)
  2977. # define lzo_int32l_t int
  2978. # define lzo_uint32l_t unsigned int
  2979. # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT
  2980. # define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT
  2981. #elif (LZO_SIZEOF_LONG >= 4)
  2982. # define lzo_int32l_t long int
  2983. # define lzo_uint32l_t unsigned long int
  2984. # define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_LONG
  2985. # define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_LONG
  2986. #else
  2987. # error "lzo_int32l_t"
  2988. #endif
  2989. #endif
  2990. #if 1
  2991. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) >= 4)
  2992. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32l_t) == LZO_SIZEOF_LZO_INT32L_T)
  2993. #endif
  2994. #if !defined(lzo_int64l_t)
  2995. #if defined(lzo_int64e_t)
  2996. # define lzo_int64l_t lzo_int64e_t
  2997. # define lzo_uint64l_t lzo_uint64e_t
  2998. # define LZO_SIZEOF_LZO_INT64L_T LZO_SIZEOF_LZO_INT64E_T
  2999. # define LZO_TYPEOF_LZO_INT64L_T LZO_TYPEOF_LZO_INT64E_T
  3000. #else
  3001. #endif
  3002. #endif
  3003. #if defined(lzo_int64l_t)
  3004. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) >= 8)
  3005. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64l_t) == LZO_SIZEOF_LZO_INT64L_T)
  3006. #endif
  3007. #if !defined(lzo_int32f_t)
  3008. #if (LZO_SIZEOF_SIZE_T >= 8)
  3009. # define lzo_int32f_t lzo_int64l_t
  3010. # define lzo_uint32f_t lzo_uint64l_t
  3011. # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT64L_T
  3012. # define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT64L_T
  3013. #else
  3014. # define lzo_int32f_t lzo_int32l_t
  3015. # define lzo_uint32f_t lzo_uint32l_t
  3016. # define LZO_SIZEOF_LZO_INT32F_T LZO_SIZEOF_LZO_INT32L_T
  3017. # define LZO_TYPEOF_LZO_INT32F_T LZO_TYPEOF_LZO_INT32L_T
  3018. #endif
  3019. #endif
  3020. #if 1
  3021. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) >= 4)
  3022. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32f_t) == LZO_SIZEOF_LZO_INT32F_T)
  3023. #endif
  3024. #if !defined(lzo_int64f_t)
  3025. #if defined(lzo_int64l_t)
  3026. # define lzo_int64f_t lzo_int64l_t
  3027. # define lzo_uint64f_t lzo_uint64l_t
  3028. # define LZO_SIZEOF_LZO_INT64F_T LZO_SIZEOF_LZO_INT64L_T
  3029. # define LZO_TYPEOF_LZO_INT64F_T LZO_TYPEOF_LZO_INT64L_T
  3030. #else
  3031. #endif
  3032. #endif
  3033. #if defined(lzo_int64f_t)
  3034. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) >= 8)
  3035. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64f_t) == LZO_SIZEOF_LZO_INT64F_T)
  3036. #endif
  3037. #if !defined(lzo_intptr_t)
  3038. #if 1 && (LZO_OS_OS400 && (LZO_SIZEOF_VOID_P == 16))
  3039. # define __LZO_INTPTR_T_IS_POINTER 1
  3040. # if !(LZO_LANG_ASSEMBLER)
  3041. typedef char * lzo_intptr_t;
  3042. typedef char * lzo_uintptr_t;
  3043. # endif
  3044. # define lzo_intptr_t lzo_intptr_t
  3045. # define lzo_uintptr_t lzo_uintptr_t
  3046. # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_VOID_P
  3047. # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_CHAR_P
  3048. #elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4))
  3049. # if !(LZO_LANG_ASSEMBLER)
  3050. typedef __w64 int lzo_intptr_t;
  3051. typedef __w64 unsigned int lzo_uintptr_t;
  3052. # endif
  3053. # define lzo_intptr_t lzo_intptr_t
  3054. # define lzo_uintptr_t lzo_uintptr_t
  3055. # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT
  3056. # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT
  3057. #elif (LZO_SIZEOF_SHORT == LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT > LZO_SIZEOF_VOID_P)
  3058. # define lzo_intptr_t short
  3059. # define lzo_uintptr_t unsigned short
  3060. # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_SHORT
  3061. # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT
  3062. #elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG)
  3063. # define lzo_intptr_t int
  3064. # define lzo_uintptr_t unsigned int
  3065. # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT
  3066. # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT
  3067. #elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P)
  3068. # define lzo_intptr_t long
  3069. # define lzo_uintptr_t unsigned long
  3070. # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LONG
  3071. # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LONG
  3072. #elif (LZO_SIZEOF_LZO_INT64L_T >= LZO_SIZEOF_VOID_P)
  3073. # define lzo_intptr_t lzo_int64l_t
  3074. # define lzo_uintptr_t lzo_uint64l_t
  3075. # define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_LZO_INT64L_T
  3076. # define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_LZO_INT64L_T
  3077. #else
  3078. # error "lzo_intptr_t"
  3079. #endif
  3080. #endif
  3081. #if 1
  3082. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) >= sizeof(void *))
  3083. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_intptr_t) == sizeof(lzo_uintptr_t))
  3084. #endif
  3085. #if !defined(lzo_word_t)
  3086. #if defined(LZO_WORDSIZE) && (LZO_WORDSIZE+0 > 0)
  3087. #if (LZO_WORDSIZE == LZO_SIZEOF_LZO_INTPTR_T) && !(__LZO_INTPTR_T_IS_POINTER)
  3088. # define lzo_word_t lzo_uintptr_t
  3089. # define lzo_sword_t lzo_intptr_t
  3090. # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INTPTR_T
  3091. # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LZO_INTPTR_T
  3092. #elif (LZO_WORDSIZE == LZO_SIZEOF_LONG)
  3093. # define lzo_word_t unsigned long
  3094. # define lzo_sword_t long
  3095. # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG
  3096. # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG
  3097. #elif (LZO_WORDSIZE == LZO_SIZEOF_INT)
  3098. # define lzo_word_t unsigned int
  3099. # define lzo_sword_t int
  3100. # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT
  3101. # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT
  3102. #elif (LZO_WORDSIZE == LZO_SIZEOF_SHORT)
  3103. # define lzo_word_t unsigned short
  3104. # define lzo_sword_t short
  3105. # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_SHORT
  3106. # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_SHORT
  3107. #elif (LZO_WORDSIZE == 1)
  3108. # define lzo_word_t unsigned char
  3109. # define lzo_sword_t signed char
  3110. # define LZO_SIZEOF_LZO_WORD_T 1
  3111. # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_CHAR
  3112. #elif (LZO_WORDSIZE == LZO_SIZEOF_LZO_INT64L_T)
  3113. # define lzo_word_t lzo_uint64l_t
  3114. # define lzo_sword_t lzo_int64l_t
  3115. # define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T
  3116. # define LZO_TYPEOF_LZO_WORD_T LZO_SIZEOF_LZO_INT64L_T
  3117. #elif (LZO_ARCH_SPU) && (LZO_CC_GNUC)
  3118. #if 0
  3119. # if !(LZO_LANG_ASSEMBLER)
  3120. typedef unsigned lzo_word_t __attribute__((__mode__(__V16QI__)));
  3121. typedef int lzo_sword_t __attribute__((__mode__(__V16QI__)));
  3122. # endif
  3123. # define lzo_word_t lzo_word_t
  3124. # define lzo_sword_t lzo_sword_t
  3125. # define LZO_SIZEOF_LZO_WORD_T 16
  3126. # define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF___MODE_V16QI
  3127. #endif
  3128. #else
  3129. # error "lzo_word_t"
  3130. #endif
  3131. #endif
  3132. #endif
  3133. #if 1 && defined(lzo_word_t)
  3134. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_word_t) == LZO_WORDSIZE)
  3135. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_sword_t) == LZO_WORDSIZE)
  3136. #endif
  3137. #if 1
  3138. #define lzo_int8_t signed char
  3139. #define lzo_uint8_t unsigned char
  3140. #define LZO_SIZEOF_LZO_INT8_T 1
  3141. #define LZO_TYPEOF_LZO_INT8_T LZO_TYPEOF_CHAR
  3142. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == 1)
  3143. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int8_t) == sizeof(lzo_uint8_t))
  3144. #endif
  3145. #if defined(lzo_int16e_t)
  3146. #define lzo_int16_t lzo_int16e_t
  3147. #define lzo_uint16_t lzo_uint16e_t
  3148. #define LZO_SIZEOF_LZO_INT16_T LZO_SIZEOF_LZO_INT16E_T
  3149. #define LZO_TYPEOF_LZO_INT16_T LZO_TYPEOF_LZO_INT16E_T
  3150. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == 2)
  3151. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int16_t) == sizeof(lzo_uint16_t))
  3152. #endif
  3153. #if defined(lzo_int32e_t)
  3154. #define lzo_int32_t lzo_int32e_t
  3155. #define lzo_uint32_t lzo_uint32e_t
  3156. #define LZO_SIZEOF_LZO_INT32_T LZO_SIZEOF_LZO_INT32E_T
  3157. #define LZO_TYPEOF_LZO_INT32_T LZO_TYPEOF_LZO_INT32E_T
  3158. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == 4)
  3159. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int32_t) == sizeof(lzo_uint32_t))
  3160. #endif
  3161. #if defined(lzo_int64e_t)
  3162. #define lzo_int64_t lzo_int64e_t
  3163. #define lzo_uint64_t lzo_uint64e_t
  3164. #define LZO_SIZEOF_LZO_INT64_T LZO_SIZEOF_LZO_INT64E_T
  3165. #define LZO_TYPEOF_LZO_INT64_T LZO_TYPEOF_LZO_INT64E_T
  3166. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == 8)
  3167. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int64_t) == sizeof(lzo_uint64_t))
  3168. #endif
  3169. #if 1
  3170. #define lzo_int_least32_t lzo_int32l_t
  3171. #define lzo_uint_least32_t lzo_uint32l_t
  3172. #define LZO_SIZEOF_LZO_INT_LEAST32_T LZO_SIZEOF_LZO_INT32L_T
  3173. #define LZO_TYPEOF_LZO_INT_LEAST32_T LZO_TYPEOF_LZO_INT32L_T
  3174. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) >= 4)
  3175. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least32_t) == sizeof(lzo_uint_least32_t))
  3176. #endif
  3177. #if defined(lzo_int64l_t)
  3178. #define lzo_int_least64_t lzo_int64l_t
  3179. #define lzo_uint_least64_t lzo_uint64l_t
  3180. #define LZO_SIZEOF_LZO_INT_LEAST64_T LZO_SIZEOF_LZO_INT64L_T
  3181. #define LZO_TYPEOF_LZO_INT_LEAST64_T LZO_TYPEOF_LZO_INT64L_T
  3182. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) >= 8)
  3183. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_least64_t) == sizeof(lzo_uint_least64_t))
  3184. #endif
  3185. #if 1
  3186. #define lzo_int_fast32_t lzo_int32f_t
  3187. #define lzo_uint_fast32_t lzo_uint32f_t
  3188. #define LZO_SIZEOF_LZO_INT_FAST32_T LZO_SIZEOF_LZO_INT32F_T
  3189. #define LZO_TYPEOF_LZO_INT_FAST32_T LZO_TYPEOF_LZO_INT32F_T
  3190. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) >= 4)
  3191. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast32_t) == sizeof(lzo_uint_fast32_t))
  3192. #endif
  3193. #if defined(lzo_int64f_t)
  3194. #define lzo_int_fast64_t lzo_int64f_t
  3195. #define lzo_uint_fast64_t lzo_uint64f_t
  3196. #define LZO_SIZEOF_LZO_INT_FAST64_T LZO_SIZEOF_LZO_INT64F_T
  3197. #define LZO_TYPEOF_LZO_INT_FAST64_T LZO_TYPEOF_LZO_INT64F_T
  3198. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) >= 8)
  3199. LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int_fast64_t) == sizeof(lzo_uint_fast64_t))
  3200. #endif
  3201. #if !defined(LZO_INT16_C)
  3202. # if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 2)
  3203. # define LZO_INT16_C(c) ((c) + 0)
  3204. # define LZO_UINT16_C(c) ((c) + 0U)
  3205. # elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 2)
  3206. # define LZO_INT16_C(c) ((c) + 0L)
  3207. # define LZO_UINT16_C(c) ((c) + 0UL)
  3208. # elif (LZO_SIZEOF_INT >= 2)
  3209. # define LZO_INT16_C(c) (c)
  3210. # define LZO_UINT16_C(c) (c##U)
  3211. # elif (LZO_SIZEOF_LONG >= 2)
  3212. # define LZO_INT16_C(c) (c##L)
  3213. # define LZO_UINT16_C(c) (c##UL)
  3214. # else
  3215. # error "LZO_INT16_C"
  3216. # endif
  3217. #endif
  3218. #if !defined(LZO_INT32_C)
  3219. # if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 4)
  3220. # define LZO_INT32_C(c) ((c) + 0)
  3221. # define LZO_UINT32_C(c) ((c) + 0U)
  3222. # elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 4)
  3223. # define LZO_INT32_C(c) ((c) + 0L)
  3224. # define LZO_UINT32_C(c) ((c) + 0UL)
  3225. # elif (LZO_SIZEOF_INT >= 4)
  3226. # define LZO_INT32_C(c) (c)
  3227. # define LZO_UINT32_C(c) (c##U)
  3228. # elif (LZO_SIZEOF_LONG >= 4)
  3229. # define LZO_INT32_C(c) (c##L)
  3230. # define LZO_UINT32_C(c) (c##UL)
  3231. # elif (LZO_SIZEOF_LONG_LONG >= 4)
  3232. # define LZO_INT32_C(c) (c##LL)
  3233. # define LZO_UINT32_C(c) (c##ULL)
  3234. # else
  3235. # error "LZO_INT32_C"
  3236. # endif
  3237. #endif
  3238. #if !defined(LZO_INT64_C) && defined(lzo_int64l_t)
  3239. # if (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_INT >= 8)
  3240. # define LZO_INT64_C(c) ((c) + 0)
  3241. # define LZO_UINT64_C(c) ((c) + 0U)
  3242. # elif (LZO_BROKEN_INTEGRAL_CONSTANTS) && (LZO_SIZEOF_LONG >= 8)
  3243. # define LZO_INT64_C(c) ((c) + 0L)
  3244. # define LZO_UINT64_C(c) ((c) + 0UL)
  3245. # elif (LZO_SIZEOF_INT >= 8)
  3246. # define LZO_INT64_C(c) (c)
  3247. # define LZO_UINT64_C(c) (c##U)
  3248. # elif (LZO_SIZEOF_LONG >= 8)
  3249. # define LZO_INT64_C(c) (c##L)
  3250. # define LZO_UINT64_C(c) (c##UL)
  3251. # else
  3252. # error "LZO_INT64_C"
  3253. # endif
  3254. #endif
  3255. #endif
  3256. #endif /* already included */
  3257. /* vim:set ts=4 sw=4 et: */