1f08c3bdfSopenharmony_ci#ifndef __has_builtin 2f08c3bdfSopenharmony_ci__has_builtin()??? Quesako? 3f08c3bdfSopenharmony_ci#define __has_builtin(x) 0 4f08c3bdfSopenharmony_ci#else 5f08c3bdfSopenharmony_ci"has __has_builtin(), yeah!" 6f08c3bdfSopenharmony_ci#endif 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_ci#if __has_builtin(nothing) 9f08c3bdfSopenharmony_ci#error "not a builtin!" 10f08c3bdfSopenharmony_ci#endif 11f08c3bdfSopenharmony_ci 12f08c3bdfSopenharmony_ci#if __has_builtin(__builtin_offsetof) \ 13f08c3bdfSopenharmony_ci || __has_builtin(__builtin_types_compatible_p) 14f08c3bdfSopenharmony_ci#error "builtin ops are not builtin functions!" 15f08c3bdfSopenharmony_ci#endif 16f08c3bdfSopenharmony_ci 17f08c3bdfSopenharmony_ci#if __has_builtin(__builtin_va_list) \ 18f08c3bdfSopenharmony_ci || __has_builtin(__builtin_ms_va_list) 19f08c3bdfSopenharmony_ci#error "builtin types are not builtin functions!" 20f08c3bdfSopenharmony_ci#endif 21f08c3bdfSopenharmony_ci 22f08c3bdfSopenharmony_ci#if __has_builtin(__builtin_abs) 23f08c3bdfSopenharmony_ciabs 24f08c3bdfSopenharmony_ci#endif 25f08c3bdfSopenharmony_ci 26f08c3bdfSopenharmony_ci#if __has_builtin(__builtin_constant_p) 27f08c3bdfSopenharmony_ciconstant_p 28f08c3bdfSopenharmony_ci#endif 29f08c3bdfSopenharmony_ci 30f08c3bdfSopenharmony_ci123 __has_builtin(abc) def 31f08c3bdfSopenharmony_ci 32f08c3bdfSopenharmony_ci/* 33f08c3bdfSopenharmony_ci * check-name: has-builtin 34f08c3bdfSopenharmony_ci * check-command: sparse -E $file 35f08c3bdfSopenharmony_ci * 36f08c3bdfSopenharmony_ci * check-output-start 37f08c3bdfSopenharmony_ci 38f08c3bdfSopenharmony_ci"has __has_builtin(), yeah!" 39f08c3bdfSopenharmony_ciabs 40f08c3bdfSopenharmony_ciconstant_p 41f08c3bdfSopenharmony_ci123 0 def 42f08c3bdfSopenharmony_ci * check-output-end 43f08c3bdfSopenharmony_ci */ 44