The official µGFX library repository.

gfx_compilers.h 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140
  1. /*
  2. * This file is subject to the terms of the GFX License. If a copy of
  3. * the license was not distributed with this file, you can obtain one at:
  4. *
  5. * http://ugfx.org/license.html
  6. */
  7. /**
  8. * @file gfx_compilers.h
  9. * @brief GFX compiler support header file.
  10. *
  11. * @addtogroup GFX
  12. *
  13. * @brief Main module to glue all the others together
  14. *
  15. * @{
  16. */
  17. #ifndef _GFX_COMPILERS_H
  18. #define _GFX_COMPILERS_H
  19. /**
  20. * @name GFX compilation options
  21. * @{
  22. */
  23. /**
  24. * @brief Should various inline ugfx functions be non-inline.
  25. * @details Defaults to FALSE
  26. * @note Generally there is no need to set this to TRUE as it will have huge performance impacts
  27. * in the driver level.
  28. */
  29. #ifndef GFX_NO_INLINE
  30. #define GFX_NO_INLINE FALSE
  31. #endif
  32. // Set the no inline value
  33. #if GFX_NO_INLINE
  34. #define GFXINLINE
  35. #endif
  36. /**
  37. * @brief Show which compiler we detected as a compiler warning message
  38. */
  39. #ifndef GFX_SHOW_COMPILER
  40. #define GFX_SHOW_COMPILER FALSE
  41. #endif
  42. /**
  43. * @brief Enable compiler specific code
  44. * @details Auto detected by default but it can be overridden in gfxconf.h
  45. * @note This is setting enables optimisations and code options that are compiler specific.
  46. * @note If the compiler can't be auto-detected it is set to GFX_COMPILER_UNKNOWN
  47. * @{
  48. */
  49. #ifndef GFX_COMPILER
  50. #define GFX_COMPILER GFX_COMPILER_UNKNOWN
  51. #endif
  52. #define GFX_COMPILER_UNKNOWN 0 //**< Unknown compiler
  53. #define GFX_COMPILER_ACC 1 //**< ACC Compiler
  54. #define GFX_COMPILER_ALTIUM 2 //**< Altium MicroBlaze C
  55. #define GFX_COMPILER_ALTIUMHW 3 //**< Altium C-to-Hardware
  56. #define GFX_COMPILER_AMSTERDAM 4 //**< Amsterdam Compiler Kit
  57. #define GFX_COMPILER_ARMCC 5 //**< ARM Compiler
  58. #define GFX_COMPILER_AZTEC 6 //**< Aztec C
  59. #define GFX_COMPILER_BORLAND 7 //**< Borland C++
  60. #define GFX_COMPILER_CC65 8 //**< CC65
  61. #define GFX_COMPILER_CLANG 9 //**< CLang (LLVM) compiler
  62. #define GFX_COMPILER_COMEAU 10 //**< Comeau C++
  63. #define GFX_COMPILER_COMPAQ 11 //**< Compaq C
  64. #define GFX_COMPILER_COMPCERT 12 //**< Compcert Compiler
  65. #define GFX_COMPILER_CONVEX 13 //**< Convex C
  66. #define GFX_COMPILER_CRAY 14 //**< Cray C/C++
  67. #define GFX_COMPILER_CYGWIN 15 //**< Cygwin (x86) unix emulator compiler for windows
  68. #define GFX_COMPILER_DAIB 16 //**< Diab C/C++
  69. #define GFX_COMPILER_DEC 17 //**< The older DEC C Compiler
  70. #define GFX_COMPILER_DICE 18 //**< DICE C Compiler
  71. #define GFX_COMPILER_DIGNUS 19 //**< Dignus Systems C++ Compiler
  72. #define GFX_COMPILER_DJGPP 20 //**< DJGPP
  73. #define GFX_COMPILER_DMARS 21 //**< Digital Mars
  74. #define GFX_COMPILER_EDG 22 //**< EDG C++
  75. #define GFX_COMPILER_EKOPATH 23 //**< EKOPath Compiler
  76. #define GFX_COMPILER_FUJITSU 24 //**< Fujitsu C++ Compiler
  77. #define GFX_COMPILER_GCC 25 //**< Standard GCC/G++
  78. #define GFX_COMPILER_GREENHILL 26 //**< Green Hill C/C++
  79. #define GFX_COMPILER_HIGHC 27 //**< Metaware High C/C++
  80. #define GFX_COMPILER_HP 28 //**< HP C/aC++
  81. #define GFX_COMPILER_IAR 29 //**< IAR C/C++
  82. #define GFX_COMPILER_IBMXL 30 //**< IBM XL C/C++ Compiler
  83. #define GFX_COMPILER_IMAGECRAFT 31 //**< ImageCraft C Compiler
  84. #define GFX_COMPILER_INTEL 32 //**< Intel ICC/ICPC Compiler
  85. #define GFX_COMPILER_KAI 33 //**< Kai C++
  86. #define GFX_COMPILER_KEIL 34 //**< Keil (use this when working with uVision IDE)
  87. #define GFX_COMPILER_LCC 35 //**< LCC
  88. #define GFX_COMPILER_METROWORKS 36 //**< Metroworks
  89. #define GFX_COMPILER_MICROTEC 37 //**< Microtec C/C++
  90. #define GFX_COMPILER_MICROWAY 38 //**< Microway NDP C
  91. #define GFX_COMPILER_MINGW32 39 //**< MingW32 (x86) compiler for windows
  92. #define GFX_COMPILER_MINGW64 40 //**< MingW64 (x64) compiler for windows
  93. #define GFX_COMPILER_MIPSPRO 41 //**< MIPS Pro
  94. #define GFX_COMPILER_MIRACLE 42 //**< Miracle C
  95. #define GFX_COMPILER_MPW 43 //**< MPW C++
  96. #define GFX_COMPILER_NORCROFT 44 //**< Norcroft ARM
  97. #define GFX_COMPILER_NWCC 45 //**< NWCC
  98. #define GFX_COMPILER_OPEN64 46 //**< Open64
  99. #define GFX_COMPILER_OSS 47 //**< Oracle Solaris Studio
  100. #define GFX_COMPILER_PACIFIC 48 //**< Pacific C
  101. #define GFX_COMPILER_PALM 49 //**< Palm C/C++
  102. #define GFX_COMPILER_PELLES 50 //**< Pelles C
  103. #define GFX_COMPILER_PGCC 51 //**< Portland PGCC/PGCPP
  104. #define GFX_COMPILER_RENESAS 52 //**< Renesas C/C++
  105. #define GFX_COMPILER_SASC 53 //**< SAS/C
  106. #define GFX_COMPILER_SCO 54 //**< SCO OpenServer
  107. #define GFX_COMPILER_SDCC 55 //**< Small Device C Compiler
  108. #define GFX_COMPILER_SN 56 //**< SN Compiler
  109. #define GFX_COMPILER_STRATUS 57 //**< Stratus VOS C
  110. #define GFX_COMPILER_SYMANTEC 58 //**< Symantec C++
  111. #define GFX_COMPILER_TENDRA 59 //**< TenDRA C/C++
  112. #define GFX_COMPILER_THINK 60 //**< Think C
  113. #define GFX_COMPILER_TI 61 //**< Texas Instruments C/C++
  114. #define GFX_COMPILER_TINYC 62 //**< Tiny C
  115. #define GFX_COMPILER_TURBOC 63 //**< Borland Turbo C
  116. #define GFX_COMPILER_ULTIMATE 64 //**< Ultimate C/C++
  117. #define GFX_COMPILER_USL 65 //**< USL C
  118. #define GFX_COMPILER_VBCC 66 //**< VBCC
  119. #define GFX_COMPILER_VS 67 //**< Microsoft Visual Studio
  120. #define GFX_COMPILER_WATCOM 68 //**< Watcom
  121. #define GFX_COMPILER_ZTC 69 //**< Zortech C++
  122. /** @} */
  123. /************************************ Start Compiler Auto-Detection *************************
  124. *
  125. * Do not alter the order of these unless you know what you are doing as some compilers try
  126. * to emulate other compilers. GCC in particular is commonly emulated and is also used as
  127. * a code base for other compiler variants.
  128. */
  129. #if GFX_COMPILER == GFX_COMPILER_UNKNOWN
  130. #undef GFX_COMPILER
  131. #if defined(__MINGW32__)
  132. #define GFX_COMPILER GFX_COMPILER_MINGW32
  133. #elif defined(__MINGW64__)
  134. #define GFX_COMPILER GFX_COMPILER_MINGW64
  135. #elif defined(__CYGWIN__)
  136. #define GFX_COMPILER GFX_COMPILER_CYGWIN
  137. #elif defined(__KEIL__) || defined(__CA__) || defined(__C51__) || defined(__CX51__) || defined(__C166__) || defined(__C251__) \
  138. || (defined(__CC_ARM) && defined(__EDG__))
  139. #define GFX_COMPILER GFX_COMPILER_KEIL
  140. #elif defined(__clang__) || defined(__llvm__)
  141. #define GFX_COMPILER GFX_COMPILER_CLANG
  142. #elif defined(__INTEL_COMPILER) || defined(__ICC) || defined(__ECC) || defined(__TCL)
  143. #define GFX_COMPILER GFX_COMPILER_INTEL
  144. #elif defined(__GNUC__) || defined(__GNUG__)
  145. #define GFX_COMPILER GFX_COMPILER_GCC
  146. #elif defined(__CC_ARM)
  147. #define GFX_COMPILER GFX_COMPILER_ARMCC
  148. #elif defined(__HP_cc) || defined(__HP_aCC)
  149. #define GFX_COMPILER GFX_COMPILER_HP
  150. #elif defined(__IBMC__) || defined(__IBMCPP__) || defined(__xlc__) || defined(__xlC__)
  151. #define GFX_COMPILER GFX_COMPILER_IBMXL
  152. #elif defined(_MSC_VER)
  153. #define GFX_COMPILER GFX_COMPILER_VS
  154. #elif defined(__PGI)
  155. #define GFX_COMPILER GFX_COMPILER_PGCC
  156. #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
  157. #define GFX_COMPILER GFX_COMPILER_OSS
  158. #elif defined(__TURBOC__)
  159. #define GFX_COMPILER GFX_COMPILER_TURBOC
  160. #elif defined(__BORLANDC__)
  161. #define GFX_COMPILER GFX_COMPILER_BORLAND
  162. #elif defined(__COMO__)
  163. #define GFX_COMPILER GFX_COMPILER_COMEAU
  164. #elif defined(__DECC) || defined(__VAXC) || defined(VAXC) || defined(__DECCXX)
  165. #define GFX_COMPILER GFX_COMPILER_COMPAQ
  166. #elif defined(__osf__) && defined(__LANGUAGE_C__)
  167. #define GFX_COMPILER GFX_COMPILER_DEC
  168. #elif defined(_CRAYC)
  169. #define GFX_COMPILER GFX_COMPILER_CRAY
  170. #elif defined(__DCC__)
  171. #define GFX_COMPILER GFX_COMPILER_DAIB
  172. #elif defined(__DMC__)
  173. #define GFX_COMPILER GFX_COMPILER_DMARS
  174. #elif defined(__KCC)
  175. #define GFX_COMPILER GFX_COMPILER_KAI
  176. #elif defined(__LCC__)
  177. #define GFX_COMPILER GFX_COMPILER_LCC
  178. #elif defined(__HIGHC__)
  179. #define GFX_COMPILER GFX_COMPILER_HIGHC
  180. #elif defined(__MWERKS__) || defined(__CWCC__)
  181. #define GFX_COMPILER GFX_COMPILER_METROWORKS
  182. #elif defined(__sgi)
  183. #define GFX_COMPILER GFX_COMPILER_MIPSPRO
  184. #elif defined(__MRC__)
  185. #define GFX_COMPILER GFX_COMPILER_MPW
  186. #elif defined(__CC_NORCROFT)
  187. #define GFX_COMPILER GFX_COMPILER_NORCROFT
  188. #elif defined(__SASC__)
  189. #define GFX_COMPILER GFX_COMPILER_SASC
  190. #elif defined( _SCO_DS )
  191. #define GFX_COMPILER GFX_COMPILER_SCO
  192. #elif defined(__TINYC__)
  193. #define GFX_COMPILER GFX_COMPILER_TINYC
  194. #elif defined( __USLC__ )
  195. #define GFX_COMPILER GFX_COMPILER_USL
  196. #elif defined(__WATCOMC__)
  197. #define GFX_COMPILER GFX_COMPILER_WATCOM
  198. #elif defined(__AZTEC_C__) || defined(AZTEC_C)
  199. #define GFX_COMPILER GFX_COMPILER_AZTEC
  200. #elif defined(__CC65__)
  201. #define GFX_COMPILER GFX_COMPILER_CC65
  202. #elif defined(__convexc__)
  203. #define GFX_COMPILER GFX_COMPILER_CONVEX
  204. #elif defined(__COMPCERT__)
  205. #define GFX_COMPILER GFX_COMPILER_COMPCERT
  206. #elif defined(_DICE)
  207. #define GFX_COMPILER GFX_COMPILER_DICE
  208. #elif defined(__SYSC__)
  209. #define GFX_COMPILER GFX_COMPILER_DIGNUS
  210. #elif defined(__DJGPP__) || defined(__GO32__)
  211. #define GFX_COMPILER GFX_COMPILER_DJGPP
  212. #elif defined(__EDG__)
  213. #define GFX_COMPILER GFX_COMPILER_EDG
  214. #elif defined(__PATHCC__)
  215. #define GFX_COMPILER GFX_COMPILER_EKOPATH
  216. #elif defined(__FCC_VERSION)
  217. #define GFX_COMPILER GFX_COMPILER_FUJITSU
  218. #elif defined(__ghs__)
  219. #define GFX_COMPILER GFX_COMPILER_GREENHILL
  220. #elif defined(__IAR_SYSTEMS_ICC__)
  221. #define GFX_COMPILER GFX_COMPILER_IAR
  222. #elif defined(_MRI)
  223. #define GFX_COMPILER GFX_COMPILER_MICROTEC
  224. #elif defined(__NDPC__) || defined(__NDPX__)
  225. #define GFX_COMPILER GFX_COMPILER_MICROWAY
  226. #elif defined(MIRACLE)
  227. #define GFX_COMPILER GFX_COMPILER_MIRACLE
  228. #elif defined(__NWCC__)
  229. #define GFX_COMPILER GFX_COMPILER_NWCC
  230. #elif defined(__OPEN64__)
  231. #define GFX_COMPILER GFX_COMPILER_OPEN64
  232. #elif defined(__PACIFIC__)
  233. #define GFX_COMPILER GFX_COMPILER_PACIFIC
  234. #elif defined(_PACC_VER)
  235. #define GFX_COMPILER GFX_COMPILER_PALM
  236. #elif defined(__POCC__)
  237. #define GFX_COMPILER GFX_COMPILER_PELLES
  238. #elif defined(__RENESAS__) || defined(__HITACHI__)
  239. #define GFX_COMPILER GFX_COMPILER_RENESAS
  240. #elif defined(SDCC)
  241. #define GFX_COMPILER GFX_COMPILER_SDCC
  242. #elif defined(__SNC__)
  243. #define GFX_COMPILER GFX_COMPILER_SN
  244. #elif defined(__VOSC__)
  245. #define GFX_COMPILER GFX_COMPILER_STRATUS
  246. #elif defined(__TenDRA__)
  247. #define GFX_COMPILER GFX_COMPILER_TENDRA
  248. #elif defined(__TI_COMPILER_VERSION__)
  249. #define GFX_COMPILER GFX_COMPILER_TI
  250. #elif defined(THINKC3) || defined(THINKC4)
  251. #define GFX_COMPILER GFX_COMPILER_THINK
  252. #elif defined(_UCC)
  253. #define GFX_COMPILER GFX_COMPILER_ULTIMATE
  254. #elif defined(__VBCC__)
  255. #define GFX_COMPILER GFX_COMPILER_VBCC
  256. #elif defined(__ZTC__)
  257. #define GFX_COMPILER GFX_COMPILER_ZTC
  258. #elif defined(__SC__)
  259. #define GFX_COMPILER GFX_COMPILER_SYMANTEC
  260. #elif defined(_ACC_)
  261. #define GFX_COMPILER GFX_COMPILER_ACC
  262. #elif defined(__CMB__)
  263. #define GFX_COMPILER GFX_COMPILER_ALTIUM
  264. #elif defined(__CHC__)
  265. #define GFX_COMPILER GFX_COMPILER_ALTIUMHW
  266. #elif defined(__ACK__)
  267. #define GFX_COMPILER GFX_COMPILER_AMSTERDAM
  268. #elif defined(__IMAGECRAFT__)
  269. #define GFX_COMPILER GFX_COMPILER_IMAGECRAFT
  270. #else
  271. #define GFX_COMPILER GFX_COMPILER_UNKNOWN
  272. #endif
  273. #endif
  274. /************************************ End Compiler Auto-Detection *************************/
  275. /************************************ Start Compiler Settings *****************************
  276. *
  277. * Please keep this list in alphabetical order to keep it easier to maintain
  278. */
  279. #undef GFX_COMPILER_NAME
  280. #undef GFX_COMPILER_TESTED
  281. #undef GFX_COMPILER_VERSION_MAJOR
  282. #undef GFX_COMPILER_VERSION_MINOR
  283. #undef GFX_COMPILER_VERSION_PATCH
  284. #undef GFX_COMPILER_VERSION_BUILD
  285. #if GFX_COMPILER == GFX_COMPILER_ACC
  286. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  287. #warning "Compiler: ACC"
  288. #endif
  289. #define GFX_COMPILER_NAME "ACC"
  290. #elif GFX_COMPILER == GFX_COMPILER_ALTIUM
  291. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  292. #warning "Compiler: ALTIUM"
  293. #endif
  294. #define GFX_COMPILER_NAME "Altium MicroBlaze C"
  295. #ifdef __BUILD__
  296. #define GFX_COMPILER_VERSION_MAJOR ((__BUILD__)/1000000)
  297. #define GFX_COMPILER_VERSION_MINOR (((__BUILD__)/1000)%1000)
  298. #define GFX_COMPILER_VERSION_PATCH ((__BUILD__)%1000)
  299. #else
  300. #define GFX_COMPILER_VERSION_MAJOR ((__VERSION__)/1000)
  301. #define GFX_COMPILER_VERSION_MINOR ((__VERSION__)%1000)
  302. #define GFX_COMPILER_VERSION_PATCH (__REVISION__)
  303. #endif
  304. #elif GFX_COMPILER == GFX_COMPILER_ALTIUMHW
  305. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  306. #warning "Compiler: ALTIUMHW"
  307. #endif
  308. #define GFX_COMPILER_NAME "Altium C-to-Hardware"
  309. #ifdef __BUILD__
  310. #define GFX_COMPILER_VERSION_MAJOR ((__BUILD__)/1000000)
  311. #define GFX_COMPILER_VERSION_MINOR (((__BUILD__)/1000)%1000)
  312. #define GFX_COMPILER_VERSION_PATCH ((__BUILD__)%1000)
  313. #else
  314. #define GFX_COMPILER_VERSION_MAJOR ((__VERSION__)/1000)
  315. #define GFX_COMPILER_VERSION_MINOR ((__VERSION__)%1000)
  316. #define GFX_COMPILER_VERSION_PATCH (__REVISION__)
  317. #endif
  318. #elif GFX_COMPILER == GFX_COMPILER_AMSTERDAM
  319. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  320. #warning "Compiler: AMSTERDAM"
  321. #endif
  322. #define GFX_COMPILER_NAME "Amsterdam Compiler Kit"
  323. #elif GFX_COMPILER == GFX_COMPILER_ARMCC
  324. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  325. #warning "Compiler: ARMCC"
  326. #endif
  327. #define GFX_COMPILER_NAME "ARMCC"
  328. #define GFX_COMPILER_VERSION_MAJOR ((__ARMCC_VERSION)/100000)
  329. #define GFX_COMPILER_VERSION_MINOR (((__ARMCC_VERSION)/10000)%10)
  330. #define GFX_COMPILER_VERSION_PATCH (((__ARMCC_VERSION)/1000)%10)
  331. #define GFX_COMPILER_VERSION_BUILD ((__ARMCC_VERSION)%1000)
  332. #define __LITTLE_IF_NOT_BIG__ // Oops - Defines __BIG_ENDIAN but not __LITTLE_ENDIAN
  333. #elif GFX_COMPILER == GFX_COMPILER_AZTEC
  334. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  335. #warning "Compiler: AZTEC"
  336. #endif
  337. #define GFX_COMPILER_NAME "Aztec"
  338. #define GFX_COMPILER_VERSION_MAJOR ((__VERSION)/100)
  339. #define GFX_COMPILER_VERSION_MINOR ((__VERSION)%100)
  340. #elif GFX_COMPILER == GFX_COMPILER_BORLAND
  341. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  342. #warning "Compiler: BORLAND"
  343. #endif
  344. #define GFX_COMPILER_NAME "Borland C++"
  345. #define GFX_COMPILER_VERSION_MAJOR ((__BORLANDC__)/0x100)
  346. #define GFX_COMPILER_VERSION_MINOR (((((__BORLANDC__)%0x100)/0x10)*10) + ((__BORLANDC__)%0x10))
  347. #elif GFX_COMPILER == GFX_COMPILER_CC65
  348. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  349. #warning "Compiler: CC65"
  350. #endif
  351. #define GFX_COMPILER_NAME "CC65"
  352. #define GFX_COMPILER_VERSION_MAJOR ((__CC65__)/0x100)
  353. #define GFX_COMPILER_VERSION_MINOR (((__CC65__)/0x10)%0x10)
  354. #define GFX_COMPILER_VERSION_PATCH ((__CC65__)%0x10)
  355. #elif GFX_COMPILER == GFX_COMPILER_CLANG
  356. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  357. #warning "Compiler: CLANG"
  358. #endif
  359. #define GFX_COMPILER_NAME "CLang (LLVM)"
  360. #define GFX_COMPILER_TESTED TRUE
  361. #define GFX_COMPILER_VERSION_MAJOR (__clang_major__)
  362. #define GFX_COMPILER_VERSION_MINOR (__clang_minor__)
  363. #define GFX_COMPILER_VERSION_PATCH (__clang_patchlevel__)
  364. #define DEPRECATED(msg) __attribute__((deprecated(msg)))
  365. #elif GFX_COMPILER == GFX_COMPILER_COMEAU
  366. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  367. #warning "Compiler: COMEAU"
  368. #endif
  369. #define GFX_COMPILER_NAME "Comeau C++"
  370. #define GFX_COMPILER_VERSION_MAJOR ((__COMO_VERSION__)/100)
  371. #define GFX_COMPILER_VERSION_MINOR ((__COMO_VERSION__)%100)
  372. #elif GFX_COMPILER == GFX_COMPILER_COMPAQ
  373. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  374. #warning "Compiler: COMPAQ"
  375. #endif
  376. #define GFX_COMPILER_NAME "Compaq C"
  377. #define GFX_COMPILER_VERSION_MAJOR ((__DECC_VER)/10000000)
  378. #define GFX_COMPILER_VERSION_MINOR (((__DECC_VER)/100000)%100)
  379. #define GFX_COMPILER_VERSION_PATCH ((__DECC_VER)%10000)
  380. #elif GFX_COMPILER == GFX_COMPILER_COMPCERT
  381. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  382. #warning "Compiler: COMPCERT"
  383. #endif
  384. #define GFX_COMPILER_NAME "Compcert"
  385. #elif GFX_COMPILER == GFX_COMPILER_CONVEX
  386. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  387. #warning "Compiler: CONVEX"
  388. #endif
  389. #define GFX_COMPILER_NAME "Convex C"
  390. #elif GFX_COMPILER == GFX_COMPILER_CRAY
  391. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  392. #warning "Compiler: CRAY"
  393. #endif
  394. #define GFX_COMPILER_NAME "Cray C/C++"
  395. #define GFX_COMPILER_VERSION_MAJOR (_RELEASE)
  396. #define GFX_COMPILER_VERSION_MINOR (_RELEASE_MINOR)
  397. #elif GFX_COMPILER == GFX_COMPILER_CYGWIN
  398. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  399. #warning "Compiler: CYGWIN"
  400. #endif
  401. #define GFX_COMPILER_NAME "Cygwin"
  402. #define GFX_COMPILER_TESTED TRUE
  403. #define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
  404. #define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
  405. #ifdef __GNUC_PATCHLEVEL__
  406. #define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
  407. #endif
  408. #define DEPRECATED(msg) __attribute__((deprecated(msg)))
  409. #elif GFX_COMPILER == GFX_COMPILER_DAIB
  410. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  411. #warning "Compiler: DAIB"
  412. #endif
  413. #define GFX_COMPILER_NAME "Diab C/C++"
  414. #define GFX_COMPILER_VERSION_MAJOR ((__VERSION_NUMBER__)/1000)
  415. #define GFX_COMPILER_VERSION_MINOR (((__VERSION_NUMBER__)/100)%10)
  416. #define GFX_COMPILER_VERSION_PATCH ((__VERSION_NUMBER__)%100)
  417. #elif GFX_COMPILER == GFX_COMPILER_DEC
  418. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  419. #warning "Compiler: DEC"
  420. #endif
  421. #define GFX_COMPILER_NAME "DEC"
  422. #elif GFX_COMPILER == GFX_COMPILER_DICE
  423. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  424. #warning "Compiler: DICE"
  425. #endif
  426. #define GFX_COMPILER_NAME "DICE C"
  427. #elif GFX_COMPILER == GFX_COMPILER_DIGNUS
  428. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  429. #warning "Compiler: DIGNUS"
  430. #endif
  431. #define GFX_COMPILER_NAME "Dignus Systems C++"
  432. #define GFX_COMPILER_VERSION_MAJOR ((__SYSC_VER__)/10000)
  433. #define GFX_COMPILER_VERSION_MINOR (((__SYSC_VER__)/100)%100)
  434. #define GFX_COMPILER_VERSION_PATCH ((__SYSC_VER__)%100)
  435. #elif GFX_COMPILER == GFX_COMPILER_DJGPP
  436. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  437. #warning "Compiler: DJGPP"
  438. #endif
  439. #define GFX_COMPILER_NAME "DJGPP"
  440. #ifdef __DJGPP__
  441. #define GFX_COMPILER_VERSION_MAJOR (__DJGPP__)
  442. #define GFX_COMPILER_VERSION_MINOR (__DJGPP_MINOR__)
  443. #else
  444. #define GFX_COMPILER_VERSION_MAJOR (1)
  445. #endif
  446. #elif GFX_COMPILER == GFX_COMPILER_DMARS
  447. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  448. #warning "Compiler: DMARS"
  449. #endif
  450. #define GFX_COMPILER_NAME "Digital Mars"
  451. #define GFX_COMPILER_VERSION_MAJOR ((__DMC__)/0x100)
  452. #define GFX_COMPILER_VERSION_MINOR (((__DMC__)/0x10)%0x10)
  453. #define GFX_COMPILER_VERSION_PATCH ((__DMC__)%0x10)
  454. #elif GFX_COMPILER == GFX_COMPILER_EDG
  455. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  456. #warning "Compiler: EDG"
  457. #endif
  458. #define GFX_COMPILER_NAME "EDG C++"
  459. #define GFX_COMPILER_TESTED TRUE
  460. #define GFX_COMPILER_VERSION_MAJOR ((__EDG_VERSION__)/100)
  461. #define GFX_COMPILER_VERSION_MINOR ((__EDG_VERSION__)%100)
  462. #pragma diag_remark = Pe301
  463. #pragma diag_remark = Pe083
  464. #pragma diag_remark = Pe767
  465. #pragma diag_remark = Pe188
  466. #pragma diag_remark = Pe186
  467. #pragma diag_remark = Pe068
  468. #pragma diag_remark = Pa050
  469. #elif GFX_COMPILER == GFX_COMPILER_EKOPATH
  470. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  471. #warning "Compiler: EKOPATH"
  472. #endif
  473. #define GFX_COMPILER_NAME "EKOPath"
  474. #define GFX_COMPILER_VERSION_MAJOR (__PATHCC__)
  475. #define GFX_COMPILER_VERSION_MINOR (__PATHCC_MINOR__)
  476. #define GFX_COMPILER_VERSION_PATCH (__PATHCC_PATCHLEVEL__)
  477. #elif GFX_COMPILER == GFX_COMPILER_FUJITSU
  478. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  479. #warning "Compiler: FUJITSU"
  480. #endif
  481. #define GFX_COMPILER_NAME "Fujitsu C++"
  482. #elif GFX_COMPILER == GFX_COMPILER_GCC
  483. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  484. #warning "Compiler: GCC"
  485. #endif
  486. #define GFX_COMPILER_NAME "GCC"
  487. #define GFX_COMPILER_TESTED TRUE
  488. #define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
  489. #define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
  490. #ifdef __GNUC_PATCHLEVEL__
  491. #define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
  492. #endif
  493. #define DEPRECATED(msg) __attribute__((deprecated(msg)))
  494. #elif GFX_COMPILER == GFX_COMPILER_GREENHILL
  495. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  496. #warning "Compiler: GREENHILL"
  497. #endif
  498. #define GFX_COMPILER_NAME "Green Hill C/C++"
  499. #define GFX_COMPILER_VERSION_MAJOR ((__GHS_VERSION_NUMBER__)/100)
  500. #define GFX_COMPILER_VERSION_MINOR (((__GHS_VERSION_NUMBER__)/10)%10)
  501. #define GFX_COMPILER_VERSION_PATCH ((__GHS_VERSION_NUMBER__)%10)
  502. #elif GFX_COMPILER == GFX_COMPILER_HIGHC
  503. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  504. #warning "Compiler: HIGHC"
  505. #endif
  506. #define GFX_COMPILER_NAME "Metaware High C/C++"
  507. #elif GFX_COMPILER == GFX_COMPILER_HP
  508. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  509. #warning "Compiler: HP"
  510. #endif
  511. #define GFX_COMPILER_NAME "HP C/aC++"
  512. #ifdef __HP_aCC
  513. #if __HP_aCC == 1
  514. #define GFX_COMPILER_VERSION_MAJOR (1)
  515. #define GFX_COMPILER_VERSION_MINOR (15)
  516. #else
  517. #define GFX_COMPILER_VERSION_MAJOR ((__HP_aCC)/10000)
  518. #define GFX_COMPILER_VERSION_MINOR (((__HP_aCC)/100)%100)
  519. #define GFX_COMPILER_VERSION_PATCH ((__HP_aCC)%100)
  520. #endif
  521. #endif
  522. #elif GFX_COMPILER == GFX_COMPILER_IAR
  523. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  524. #warning "Compiler: IAR"
  525. #endif
  526. #define GFX_COMPILER_NAME "IAR C++"
  527. #define GFX_COMPILER_TESTED TRUE
  528. #define GFX_COMPILER_VERSION_MAJOR ((__VER__)/100)
  529. #define GFX_COMPILER_VERSION_MINOR ((__VER__)%100)
  530. #pragma diag_remark = Pe301
  531. #pragma diag_remark = Pe083
  532. #pragma diag_remark = Pe767
  533. #pragma diag_remark = Pe188
  534. #pragma diag_remark = Pe186
  535. #pragma diag_remark = Pe068
  536. #pragma diag_remark = Pa050
  537. #elif GFX_COMPILER == GFX_COMPILER_IBMXL
  538. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  539. #warning "Compiler: IBMXL"
  540. #endif
  541. #define GFX_COMPILER_NAME "IBM XL C/C++"
  542. #ifdef __xlC__
  543. #define GFX_COMPILER_VERSION_MAJOR ((__xlC__)/0x100)
  544. #define GFX_COMPILER_VERSION_MINOR ((__xlC__)%0x100)
  545. #define GFX_COMPILER_VERSION_PATCH ((__xlC_ver__)/0x100)
  546. #define GFX_COMPILER_VERSION_BUILD ((__xlC_ver__)%0x100)
  547. #elif defined(__COMPILER_VER__)
  548. #define GFX_COMPILER_VERSION_MAJOR (((__COMPILER_VER__)/0x1000000)%0x10)
  549. #define GFX_COMPILER_VERSION_MINOR (((__COMPILER_VER__)/0x10000)%0x100)
  550. #define GFX_COMPILER_VERSION_PATCH ((__COMPILER_VER__)/0x10000)
  551. #elif defined(__IBMC__)
  552. #define GFX_COMPILER_VERSION_MAJOR ((__IBMC__)/100)
  553. #define GFX_COMPILER_VERSION_MINOR (((__IBMC__)/10)%10)
  554. #define GFX_COMPILER_VERSION_PATCH ((__IBMC__)%10)
  555. #elif defined(__IBMCPP__)
  556. #define GFX_COMPILER_VERSION_MAJOR ((__IBMCPP__)/100)
  557. #define GFX_COMPILER_VERSION_MINOR (((__IBMCPP__)/10)%10)
  558. #define GFX_COMPILER_VERSION_PATCH ((__IBMCPP__)%10)
  559. #endif
  560. #elif GFX_COMPILER == GFX_COMPILER_IMAGECRAFT
  561. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  562. #warning "Compiler: IMAGECRAFT"
  563. #endif
  564. #define GFX_COMPILER_NAME "Imagecraft C"
  565. #elif GFX_COMPILER == GFX_COMPILER_INTEL
  566. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  567. #warning "Compiler: INTEL"
  568. #endif
  569. #define GFX_COMPILER_NAME "Intel ICC/ICPC"
  570. #ifdef __INTEL_COMPILER
  571. #define GFX_COMPILER_VERSION_MAJOR ((__INTEL_COMPILER)/100)
  572. #define GFX_COMPILER_VERSION_MINOR (((__INTEL_COMPILER)/10)%10)
  573. #define GFX_COMPILER_VERSION_PATCH ((__INTEL_COMPILER)%10)
  574. #ifdef __INTEL_COMPILER_BUILD_DATE
  575. #define GFX_COMPILER_VERSION_BUILD (__INTEL_COMPILER_BUILD_DATE)
  576. #endif
  577. #endif
  578. #elif GFX_COMPILER == GFX_COMPILER_KAI
  579. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  580. #warning "Compiler: KAI"
  581. #endif
  582. #define GFX_COMPILER_NAME "Kai C++"
  583. #define GFX_COMPILER_VERSION_MAJOR ((__KCC_VERSION)/0x1000)
  584. #define GFX_COMPILER_VERSION_MINOR (((__KCC_VERSION)/0x100)%0x10)
  585. #define GFX_COMPILER_VERSION_PATCH ((__KCC_VERSION)%0x100)
  586. #elif GFX_COMPILER == GFX_COMPILER_KEIL
  587. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  588. #warning "Compiler: KEIL"
  589. #endif
  590. #define GFX_COMPILER_NAME "Keil"
  591. #define GFX_COMPILER_TESTED TRUE
  592. #if defined(__ARMCC_VERSION)
  593. #define GFX_COMPILER_VERSION_MAJOR ((__ARMCC_VERSION)/1000000)
  594. #define GFX_COMPILER_VERSION_MINOR (((__ARMCC_VERSION)/10000)%100)
  595. #define GFX_COMPILER_VERSION_PATCH ((__ARMCC_VERSION)%10000)
  596. #ifdef __EDG_VERSION__
  597. #define GFX_COMPILER_VERSION_BUILD (__EDG_VERSION__)
  598. #endif
  599. #elif defined(__CA__)
  600. #define GFX_COMPILER_VERSION_MAJOR ((__CA__)/100)
  601. #define GFX_COMPILER_VERSION_MINOR ((__CA__)%100)
  602. #elif defined(__C166__)
  603. #define GFX_COMPILER_VERSION_MAJOR ((__C166__)/100)
  604. #define GFX_COMPILER_VERSION_MINOR ((__C166__)%100)
  605. #elif defined(__C51__)
  606. #define GFX_COMPILER_VERSION_MAJOR ((__C51__)/100)
  607. #define GFX_COMPILER_VERSION_MINOR ((__C51__)%100)
  608. #elif defined(__C251__)
  609. #define GFX_COMPILER_VERSION_MAJOR ((__C251__)/100)
  610. #define GFX_COMPILER_VERSION_MINOR ((__C251__)%100)
  611. #endif
  612. #define DEPRECATED(msg) __attribute__((deprecated(msg)))
  613. #pragma anon_unions // Allow anonymous unions
  614. #pragma diag_remark 1293 // Turn off warning: assignment in condition
  615. #pragma diag_remark 83 // Turn off warning: type qualifier specified more than once
  616. #pragma diag_remark 767 // Turn off warning: conversion from pointer to smaller integer
  617. #pragma diag_remark 188 // Turn off warning: enumerated type mixed with another type
  618. #pragma diag_remark 68 // Turn off warning: integer conversion resulted in a change of sign
  619. #pragma diag_remark 111 // Turn off warning: statement is unreachable
  620. #ifndef GFXINLINE // Get the Keil definition for inline
  621. #define GFXINLINE __inline
  622. #endif
  623. #define __LITTLE_IF_NOT_BIG__ // Oops - Defines __BIG_ENDIAN but not __LITTLE_ENDIAN
  624. #elif GFX_COMPILER == GFX_COMPILER_LCC
  625. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  626. #warning "Compiler: LCC"
  627. #endif
  628. #define GFX_COMPILER_NAME "LCC"
  629. #elif GFX_COMPILER == GFX_COMPILER_METROWORKS
  630. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  631. #warning "Compiler: METROWORKS"
  632. #endif
  633. #define GFX_COMPILER_NAME "Metroworks CodeWarrior"
  634. #define GFX_COMPILER_VERSION_MAJOR ((__MWERKS__)/0x1000)
  635. #define GFX_COMPILER_VERSION_MINOR (((__MWERKS__)/0x100)%0x10)
  636. #define GFX_COMPILER_VERSION_PATCH ((__MWERKS__)%100)
  637. #elif GFX_COMPILER == GFX_COMPILER_MICROTEC
  638. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  639. #warning "Compiler: MICROTEC"
  640. #endif
  641. #define GFX_COMPILER_NAME "Microtec C/C++"
  642. #elif GFX_COMPILER == GFX_COMPILER_MICROWAY
  643. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  644. #warning "Compiler: MICROWAY"
  645. #endif
  646. #define GFX_COMPILER_NAME "Microway NDP C"
  647. #elif GFX_COMPILER == GFX_COMPILER_MINGW32
  648. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  649. #warning "Compiler: MINGW32"
  650. #endif
  651. #define GFX_COMPILER_NAME "MingW32"
  652. #define GFX_COMPILER_TESTED TRUE
  653. #define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
  654. #define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
  655. #ifdef __GNUC_PATCHLEVEL__
  656. #define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
  657. #endif
  658. #define DEPRECATED(msg) __attribute__((deprecated(msg)))
  659. #elif GFX_COMPILER == GFX_COMPILER_MINGW64
  660. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  661. #warning "Compiler: MINGW64"
  662. #endif
  663. #define GFX_COMPILER_NAME "MingW64"
  664. #define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
  665. #define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
  666. #ifdef __GNUC_PATCHLEVEL__
  667. #define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
  668. #endif
  669. #define DEPRECATED(msg) __attribute__((deprecated(msg)))
  670. #elif GFX_COMPILER == GFX_COMPILER_MIPSPRO
  671. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  672. #warning "Compiler: MIPSPRO"
  673. #endif
  674. #define GFX_COMPILER_NAME "MIPS Pro"
  675. #ifdef _SGI_COMPILER_VERSION
  676. #define GFX_COMPILER_VERSION_MAJOR ((_SGI_COMPILER_VERSION)/100)
  677. #define GFX_COMPILER_VERSION_MINOR (((_SGI_COMPILER_VERSION)/10)%10)
  678. #define GFX_COMPILER_VERSION_PATCH ((_SGI_COMPILER_VERSION)%10)
  679. #else
  680. #define GFX_COMPILER_VERSION_MAJOR ((_COMPILER_VERSION)/100)
  681. #define GFX_COMPILER_VERSION_MINOR (((_COMPILER_VERSION)/10)%10)
  682. #define GFX_COMPILER_VERSION_PATCH ((_COMPILER_VERSION)%10)
  683. #endif
  684. #elif GFX_COMPILER == GFX_COMPILER_MIRACLE
  685. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  686. #warning "Compiler: MIRACLE"
  687. #endif
  688. #define GFX_COMPILER_NAME "Miracle C"
  689. #elif GFX_COMPILER == GFX_COMPILER_MPW
  690. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  691. #warning "Compiler: MPW"
  692. #endif
  693. #define GFX_COMPILER_NAME "MPW C++"
  694. #define GFX_COMPILER_VERSION_MAJOR ((__MRC__)/0x100)
  695. #define GFX_COMPILER_VERSION_MINOR ((__MRC__)%0x100)
  696. #elif GFX_COMPILER == GFX_COMPILER_NORCROFT
  697. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  698. #warning "Compiler: NORCROFT"
  699. #endif
  700. #define GFX_COMPILER_NAME "Norcroft C"
  701. #elif GFX_COMPILER == GFX_COMPILER_NWCC
  702. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  703. #warning "Compiler: NWCC"
  704. #endif
  705. #define GFX_COMPILER_NAME "NWCC"
  706. #elif GFX_COMPILER == GFX_COMPILER_OPEN64
  707. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  708. #warning "Compiler: OPEN64"
  709. #endif
  710. #define GFX_COMPILER_NAME "Open64"
  711. #define GFX_COMPILER_VERSION_MAJOR (__OPENCC__)
  712. #define GFX_COMPILER_VERSION_MINOR (__OPENCC_MINOR__)
  713. #elif GFX_COMPILER == GFX_COMPILER_OSS
  714. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  715. #warning "Compiler: OSS"
  716. #endif
  717. #define GFX_COMPILER_NAME "Oracle Solaris Studio"
  718. #ifdef __SUNPRO_C >= 0x1000
  719. #define GFX_COMPILER_VERSION_MAJOR ((__SUNPRO_C)/0x1000)
  720. #define GFX_COMPILER_VERSION_MINOR (((((__SUNPRO_C)/0x100)%0x10)*10) + (((__SUNPRO_C)/0x10)%10))
  721. #define GFX_COMPILER_VERSION_PATCH ((__SUNPRO_C)%0x10)
  722. #else
  723. #define GFX_COMPILER_VERSION_MAJOR ((__SUNPRO_C)/0x100)
  724. #define GFX_COMPILER_VERSION_MINOR (((__SUNPRO_C)/0x10)%0x10)
  725. #define GFX_COMPILER_VERSION_PATCH ((__SUNPRO_C)%0x10)
  726. #endif
  727. #elif GFX_COMPILER == GFX_COMPILER_PACIFIC
  728. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  729. #warning "Compiler: PACIFIC"
  730. #endif
  731. #define GFX_COMPILER_NAME "Pacific C"
  732. #elif GFX_COMPILER == GFX_COMPILER_PALM
  733. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  734. #warning "Compiler: PALM"
  735. #endif
  736. #define GFX_COMPILER_NAME "Palm C/C++"
  737. #define GFX_COMPILER_VERSION_MAJOR ((_PACC_VER)/0x10000000)
  738. #define GFX_COMPILER_VERSION_MINOR (((_PACC_VER)/0x100000)%0x100)
  739. #define GFX_COMPILER_VERSION_PATCH (((_PACC_VER)/0x1000)%0x100)
  740. #define GFX_COMPILER_VERSION_BUILD ((_PACC_VER)%0x1000)
  741. #elif GFX_COMPILER == GFX_COMPILER_PELLES
  742. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  743. #warning "Compiler: PELLES"
  744. #endif
  745. #define GFX_COMPILER_NAME "Pelles C"
  746. #define GFX_COMPILER_VERSION_MAJOR ((__POCC__)/100)
  747. #define GFX_COMPILER_VERSION_MINOR ((__POCC__)%100)
  748. #elif GFX_COMPILER == GFX_COMPILER_PGCC
  749. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  750. #warning "Compiler: PGCC"
  751. #endif
  752. #define GFX_COMPILER_NAME "Portland PGCC/PGCPP"
  753. #define GFX_COMPILER_VERSION_MAJOR (__PGIC__)
  754. #define GFX_COMPILER_VERSION_MINOR (__PGIC_MINOR__)
  755. #define GFX_COMPILER_VERSION_PATCH (__PGIC_PATCHLEVEL__)
  756. #elif GFX_COMPILER == GFX_COMPILER_RENESAS
  757. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  758. #warning "Compiler: RENESAS"
  759. #endif
  760. #define GFX_COMPILER_NAME "Renesas C/C++"
  761. #ifdef __HITACHI_VERSION__
  762. #define GFX_COMPILER_VERSION_MAJOR ((__HITACHI_VERSION__)/0x100)
  763. #define GFX_COMPILER_VERSION_MINOR ((__HITACHI_VERSION__)%0x100)
  764. #elif __RENESAS_VERSION__ < 0x10000
  765. #define GFX_COMPILER_VERSION_MAJOR ((__RENESAS_VERSION__)/0x100)
  766. #define GFX_COMPILER_VERSION_MINOR ((__RENESAS_VERSION__)%0x100)
  767. #else
  768. #define GFX_COMPILER_VERSION_MAJOR ((__RENESAS_VERSION__)/0x1000000)
  769. #define GFX_COMPILER_VERSION_MINOR (((__RENESAS_VERSION__)/0x10000)%0x100)
  770. #define GFX_COMPILER_VERSION_PATCH (((__RENESAS_VERSION__)/0x100)%0x100)
  771. #define GFX_COMPILER_VERSION_BUILD ((__RENESAS_VERSION__)%0x100)
  772. #endif
  773. #elif GFX_COMPILER == GFX_COMPILER_SASC
  774. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  775. #warning "Compiler: SASC"
  776. #endif
  777. #define GFX_COMPILER_NAME "SAS/C"
  778. #ifdef __SASC__
  779. #define GFX_COMPILER_VERSION_MAJOR ((__SASC__)/100)
  780. #define GFX_COMPILER_VERSION_MINOR ((__SASC__)%100)
  781. #else
  782. #define GFX_COMPILER_VERSION_MAJOR (__VERSION__)
  783. #define GFX_COMPILER_VERSION_MINOR (__REVISION__)
  784. #endif
  785. #elif GFX_COMPILER == GFX_COMPILER_SCO
  786. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  787. #warning "Compiler: SCO"
  788. #endif
  789. #define GFX_COMPILER_NAME "SCO OpenServer"
  790. #elif GFX_COMPILER == GFX_COMPILER_SDCC
  791. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  792. #warning "Compiler: SDCC"
  793. #endif
  794. #define GFX_COMPILER_NAME "Small Device C"
  795. #define GFX_COMPILER_VERSION_MAJOR ((SDCC)/100)
  796. #define GFX_COMPILER_VERSION_MINOR (((SDCC)/10)%10)
  797. #define GFX_COMPILER_VERSION_PATCH ((SDCC)%10)
  798. #elif GFX_COMPILER == GFX_COMPILER_SN
  799. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  800. #warning "Compiler: SN"
  801. #endif
  802. #define GFX_COMPILER_NAME "SN"
  803. #elif GFX_COMPILER == GFX_COMPILER_STRATUS
  804. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  805. #warning "Compiler: STRATUS"
  806. #endif
  807. #define GFX_COMPILER_NAME "Stratus VOS C"
  808. #define GFX_COMPILER_VERSION_MAJOR (__VOSC__)
  809. #elif GFX_COMPILER == GFX_COMPILER_SYMANTEC
  810. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  811. #warning "Compiler: SYMANTEC"
  812. #endif
  813. #define GFX_COMPILER_NAME "Symantec C++"
  814. #define GFX_COMPILER_VERSION_MAJOR ((__SC__)/0x100)
  815. #define GFX_COMPILER_VERSION_MINOR ((__SC__)%0x100)
  816. #elif GFX_COMPILER == GFX_COMPILER_TENDRA
  817. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  818. #warning "Compiler: TENDRA"
  819. #endif
  820. #define GFX_COMPILER_NAME "TenDRA C/C++"
  821. #elif GFX_COMPILER == GFX_COMPILER_THINK
  822. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  823. #warning "Compiler: THINK"
  824. #endif
  825. #define GFX_COMPILER_NAME "Think C"
  826. #ifdef THINKC4
  827. #define GFX_COMPILER_VERSION_MAJOR (4)
  828. #else
  829. #define GFX_COMPILER_VERSION_MAJOR (3)
  830. #endif
  831. #elif GFX_COMPILER == GFX_COMPILER_TI
  832. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  833. #warning "Compiler: TI"
  834. #endif
  835. #define GFX_COMPILER_NAME "Texas Instruments C/C++"
  836. #define GFX_COMPILER_VERSION_MAJOR ((SDCC)/1000000)
  837. #define GFX_COMPILER_VERSION_MINOR (((SDCC)/1000)%1000)
  838. #define GFX_COMPILER_VERSION_PATCH ((SDCC)%1000)
  839. #elif GFX_COMPILER == GFX_COMPILER_TINYC
  840. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  841. #warning "Compiler: TINYC"
  842. #endif
  843. #define GFX_COMPILER_NAME "Tiny C"
  844. #define GFX_COMPILER_TESTED TRUE
  845. #elif GFX_COMPILER == GFX_COMPILER_TURBOC
  846. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  847. #warning "Compiler: TURBOC"
  848. #endif
  849. #define GFX_COMPILER_NAME "Borland Turbo C/C++"
  850. #if __TURBOC__ < 0x295 || __TURBOC__ >= 0x400
  851. #define GFX_COMPILER_VERSION_MAJOR ((__TURBOC__)/0x100)
  852. #define GFX_COMPILER_VERSION_MINOR ((__TURBOC__)%0x100)
  853. #elif __TURBOC__ == 0x295
  854. #define GFX_COMPILER_VERSION_MAJOR (1)
  855. #define GFX_COMPILER_VERSION_MINOR (0)
  856. #elif __TURBOC__ == 0x296
  857. #define GFX_COMPILER_VERSION_MAJOR (1)
  858. #define GFX_COMPILER_VERSION_MINOR (1)
  859. #elif __TURBOC__ == 0x297
  860. #define GFX_COMPILER_VERSION_MAJOR (2)
  861. #define GFX_COMPILER_VERSION_MINOR (0)
  862. #endif
  863. #elif GFX_COMPILER == GFX_COMPILER_ULTIMATE
  864. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  865. #warning "Compiler: ULTIMATE"
  866. #endif
  867. #define GFX_COMPILER_NAME "Ultimate C/C++"
  868. #define GFX_COMPILER_VERSION_MAJOR (_MAJOR_REV)
  869. #define GFX_COMPILER_VERSION_MINOR (_MINOR_REV)
  870. #elif GFX_COMPILER == GFX_COMPILER_USL
  871. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  872. #warning "Compiler: USL"
  873. #endif
  874. #define GFX_COMPILER_NAME "USL C"
  875. #define GFX_COMPILER_VERSION_MAJOR ((__SCO_VERSION__)/100000000)
  876. #define GFX_COMPILER_VERSION_MINOR (((__SCO_VERSION__)/1000000)%100)
  877. #define GFX_COMPILER_VERSION_BUILD ((__SCO_VERSION__)%1000000)
  878. #elif GFX_COMPILER == GFX_COMPILER_VBCC
  879. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  880. #warning "Compiler: VBCC"
  881. #endif
  882. #define GFX_COMPILER_NAME "VBCC"
  883. #elif GFX_COMPILER == GFX_COMPILER_VS
  884. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  885. #warning "Compiler: VS"
  886. #endif
  887. #define GFX_COMPILER_NAME "Microsoft Visual Studio"
  888. #ifdef _MSC_FULL_VER
  889. #if _MSC_FULL_VER < 100000000
  890. #define GFX_COMPILER_VERSION_MAJOR ((_MSC_FULL_VER)/1000000)
  891. #define GFX_COMPILER_VERSION_MINOR (((_MSC_FULL_VER)/10000)%100)
  892. #define GFX_COMPILER_VERSION_PATCH (((_MSC_FULL_VER)/10000)%10000)
  893. #else
  894. #define GFX_COMPILER_VERSION_MAJOR ((_MSC_FULL_VER)/10000000)
  895. #define GFX_COMPILER_VERSION_MINOR (((_MSC_FULL_VER)/100000)%100)
  896. #define GFX_COMPILER_VERSION_PATCH (((_MSC_FULL_VER)/100000)%10000)
  897. #endif
  898. #else
  899. #define GFX_COMPILER_VERSION_MAJOR ((_MSC_VER)/100)
  900. #define GFX_COMPILER_VERSION_MINOR ((_MSC_VER)%100)
  901. #endif
  902. #ifdef _MSC_BUILD
  903. #define GFX_COMPILER_VERSION_BUILD (_MSC_BUILD)
  904. #endif
  905. #define DEPRECATED(msg) __declspec(deprecated(msg))
  906. #elif GFX_COMPILER == GFX_COMPILER_WATCOM
  907. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  908. #warning "Compiler: WATCOM"
  909. #endif
  910. #define GFX_COMPILER_NAME "Watcom C"
  911. #define GFX_COMPILER_VERSION_MAJOR ((__WATCOMC__)/100)
  912. #define GFX_COMPILER_VERSION_MINOR ((__WATCOMC__)%100)
  913. #elif GFX_COMPILER == GFX_COMPILER_ZTC
  914. #if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
  915. #warning "Compiler: ZTC"
  916. #endif
  917. #define GFX_COMPILER_NAME "Zortech C++"
  918. #define GFX_COMPILER_VERSION_MAJOR ((__ZTC__)/0x100)
  919. #define GFX_COMPILER_VERSION_MINOR (((__ZTC__)/0x10)%0x10)
  920. #define GFX_COMPILER_VERSION_PATCH ((__ZTC__)%0x10)
  921. #endif
  922. #ifndef GFX_COMPILER_TESTED
  923. #define GFX_COMPILER_TESTED FALSE
  924. #endif
  925. /************************************ End Compiler Settings *************************/
  926. /**
  927. * @brief The name of the compiler set or auto-detected
  928. * @details Read-Only
  929. * @note If you successfully compile ugfx with an unknown compiler
  930. * please report back to us via the ugfx forum so that we can add
  931. * it to our list of compilers to detect.
  932. */
  933. #ifndef GFX_COMPILER_NAME
  934. #define GFX_COMPILER_NAME "Unknown"
  935. #warning "You are using an unknown compiler. Please report this on the ugfx forum"
  936. #endif
  937. /**
  938. * @brief This compiler is tested with ugfx
  939. * @details Read-Only
  940. * @note If you successfully compile ugfx with an un-tested compiler
  941. * please report back to us via the ugfx forum any compile errors
  942. * or warnings so that we can add it to our list of tested compilers.
  943. * @note Although the compiler being used may be tested, it may have been
  944. * tested with a different compiler version. Please report any problems
  945. * on the ugfx forum.
  946. */
  947. #if !GFX_COMPILER_TESTED
  948. #warning "You are using an un-tested compiler. Please report any compile errors or warnings on the ugfx forum"
  949. #endif
  950. /**
  951. * @brief The major version number of the compiler
  952. * @details Read-Only. It will be set to 0 if it can't be automatically detected.
  953. * @note If you know how to detect a version number for a compiler and we haven't,
  954. * please report this on the ugfx forum.
  955. */
  956. #ifndef GFX_COMPILER_VERSION_MAJOR
  957. #define GFX_COMPILER_VERSION_MAJOR 0
  958. #endif
  959. /**
  960. * @brief The minor version number of the compiler
  961. * @details Read-Only. It will be set to 0 if it can't be automatically detected.
  962. * @note If you know how to detect a version number for a compiler and we haven't,
  963. * please report this on the ugfx forum.
  964. */
  965. #ifndef GFX_COMPILER_VERSION_MINOR
  966. #define GFX_COMPILER_VERSION_MINOR 0
  967. #endif
  968. /**
  969. * @brief The patch version number of the compiler
  970. * @details Read-Only. It will be set to 0 if it can't be automatically detected.
  971. * @note If you know how to detect a version number for a compiler and we haven't,
  972. * please report this on the ugfx forum.
  973. */
  974. #ifndef GFX_COMPILER_VERSION_PATCH
  975. #define GFX_COMPILER_VERSION_PATCH 0
  976. #endif
  977. /**
  978. * @brief The build number of the compiler
  979. * @details Read-Only. It will be set to 0 if it can't be automatically detected.
  980. * @note If you know how to detect a version number for a compiler and we haven't,
  981. * please report this on the ugfx forum.
  982. */
  983. #ifndef GFX_COMPILER_VERSION_BUILD
  984. #define GFX_COMPILER_VERSION_BUILD 0
  985. #endif
  986. /**
  987. * @brief Enable CPU specific code
  988. * @details Auto detected by default but it can be overridden in gfxconf.h
  989. * @note This is setting enables optimisations and code options that are CPU specific.
  990. * @note If the CPU can't be auto-detected it is set to GFX_CPU_UNKNOWN
  991. * @note Auto-detection is particularly weak currently particularly for ARM and other
  992. * non-Intel platforms. This doesn't normally matter very much as everything is
  993. * handled with more conservative code. Where you might want to add a manual CPU
  994. * define is for operating systems such as RAW32 that use the generic ugfx thread code
  995. * rather than operating system defined threading routines. For these platforms specifying
  996. * the CPU can make a decent performance improvement.
  997. * @{
  998. */
  999. #ifndef GFX_CPU
  1000. #define GFX_CPU GFX_CPU_UNKNOWN
  1001. #endif
  1002. #define GFX_CPU_UNKNOWN 0 //**< Unknown cpu
  1003. #define GFX_CPU_CORTEX_M0 0x01 //**< Cortex M0
  1004. #define GFX_CPU_CORTEX_M1 0x02 //**< Cortex M1
  1005. #define GFX_CPU_CORTEX_M2 0x03 //**< Cortex M2
  1006. #define GFX_CPU_CORTEX_M3 0x04 //**< Cortex M3
  1007. #define GFX_CPU_CORTEX_M4 0x05 //**< Cortex M4
  1008. #define GFX_CPU_CORTEX_M4_FP 0x06 //**< Cortex M4 with hardware floating point
  1009. #define GFX_CPU_CORTEX_M7 0x07 //**< Cortex M7
  1010. #define GFX_CPU_CORTEX_M7_FP 0x08 //**< Cortex M7 with hardware floating point
  1011. #define GFX_CPU_X86 0x10 //**< Intel x86
  1012. #define GFX_CPU_X64 0x11 //**< Intel x64
  1013. #define GFX_CPU_IA64 0x12 //**< Intel Itanium
  1014. #define GFX_CPU_POWERPC32 0x20 //**< PowerPC
  1015. #define GFX_CPU_POWERPC64 0x21 //**< PowerPC
  1016. #define GFX_CPU_SPARC 0x22 //**< Sparc
  1017. /** @} */
  1018. /************************************ Start CPU Auto-Detection *****************************/
  1019. #if GFX_CPU == GFX_CPU_UNKNOWN
  1020. #undef GFX_CPU
  1021. #if defined(__ia64) || defined(__itanium__) || defined(_M_IA64)
  1022. #define GFX_CPU GFX_CPU_IA64
  1023. #elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
  1024. #if defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || defined(__64BIT__) || defined(_LP64) || defined(__LP64__)
  1025. #define GFX_CPU GFX_CPU_POWERPC64
  1026. #else
  1027. #define GFX_CPU GFX_CPU_POWERPC32
  1028. #endif
  1029. #elif defined(__sparc)
  1030. #define GFX_CPU GFX_CPU_SPARC
  1031. #elif defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || defined(_WIN64)
  1032. #define GFX_CPU GFX_CPU_X64
  1033. #elif defined(__i386) || defined(_M_IX86) || defined(_WIN32)
  1034. #define GFX_CPU GFX_CPU_X86
  1035. #else
  1036. #define GFX_CPU GFX_CPU_UNKNOWN
  1037. #endif
  1038. #endif
  1039. /************************************ End CPU Auto-Detection *****************************/
  1040. /************************************ Start CPU Settings *****************************/
  1041. #if GFX_CPU == GFX_CPU_X86
  1042. #undef GFX_CPU_NO_ALIGNMENT_FAULTS
  1043. #define GFX_CPU_NO_ALIGNMENT_FAULTS TRUE
  1044. #undef GFX_CPU_ENDIAN
  1045. #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_LITTLE
  1046. #elif GFX_CPU == GFX_CPU_X64
  1047. #undef GFX_CPU_ENDIAN
  1048. #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_LITTLE
  1049. #endif
  1050. /************************************ End CPU Settings *****************************/
  1051. /**
  1052. * @brief Does this CPU automatically handle alignment faults
  1053. * @details Defaults to FALSE
  1054. * @note Setting this to TRUE can decrease code size and increase speed but
  1055. * it should not be turned on with a CPU that can generate
  1056. * alignment segfaults.
  1057. * @note If you are unsure leave this as FALSE as that generates
  1058. * the more conservative code.
  1059. * @note For some CPU's this can be auto-detected.
  1060. */
  1061. #ifndef GFX_CPU_NO_ALIGNMENT_FAULTS
  1062. #define GFX_CPU_NO_ALIGNMENT_FAULTS FALSE
  1063. #endif
  1064. /**
  1065. * @brief The endianness of the CPU
  1066. * @details Auto detected by default but it can be overridden in gfxconf.h
  1067. * @note This is setting enables optimisations that are cpu endian specific.
  1068. * @note If the endianness can't be auto-detected it is set to GFX_CPU_ENDIAN_UNKNOWN
  1069. * and safe (but potentially slow) code is generated
  1070. * @{
  1071. */
  1072. #ifndef GFX_CPU_ENDIAN
  1073. #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_UNKNOWN
  1074. #endif
  1075. #define GFX_CPU_ENDIAN_UNKNOWN 0 //**< Unknown endianness
  1076. #define GFX_CPU_ENDIAN_LITTLE 0x03020100 //**< Little endian
  1077. #define GFX_CPU_ENDIAN_BIG 0x00010203 //**< Big endian
  1078. #define GFX_CPU_ENDIAN_WBDWL 0x02030001 //**< Words are big endian, DWords are little endian eg. Honeywell 316
  1079. #define GFX_CPU_ENDIAN_WLDWB 0x01000302 //**< Words are little endian, DWords are big endian eg PDP-11
  1080. /** @} */
  1081. /************************************ Start Endianness Auto-Detection *****************************/
  1082. #if GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_UNKNOWN
  1083. #undef GFX_CPU_ENDIAN
  1084. #if (defined(__BYTE_ORDER__)&&defined(__ORDER_BIG_ENDIAN__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) \
  1085. || (defined(__BYTE_ORDER)&&defined(__BIG_ENDIAN)&&(__BYTE_ORDER == __BIG_ENDIAN)) \
  1086. || defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN) \
  1087. || defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) \
  1088. || defined(__THUMBEB__) || defined(__AARCH64EB__) || defined(__ARMEB__)
  1089. #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_BIG
  1090. #elif (defined(__BYTE_ORDER__)&&defined(__ORDER_LITTLE_ENDIAN__)&&(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) \
  1091. || (defined(__BYTE_ORDER)&&defined(_LITTLE_ENDIAN)&&(__BYTE_ORDER == _LITTLE_ENDIAN)) \
  1092. || defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN) \
  1093. || defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) \
  1094. || defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(__ARMEL__) \
  1095. || defined(__LITTLE_IF_NOT_BIG__)
  1096. #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_LITTLE
  1097. #else
  1098. #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_UNKNOWN
  1099. #endif
  1100. #endif
  1101. /************************************ End Endianness Auto-Detection *****************************/
  1102. /**
  1103. * @brief Mark a function as deprecated.
  1104. */
  1105. #ifndef DEPRECATED
  1106. #define DEPRECATED(msg)
  1107. #endif
  1108. /**
  1109. * @brief Mark a function as inline.
  1110. */
  1111. #ifndef GFXINLINE
  1112. #define GFXINLINE inline
  1113. #endif
  1114. /** @} */
  1115. #endif /* _GFX_COMPILERS_H */
  1116. /** @} */