WAFFLE_FEATURE_TEST_(7)

✨ WAFFLE_FEATURE_TEST_(7) ✨

okay bestie, welcome to the Waffle Manual πŸ’… this is the page for waffle_feature_test_macros, and it's genuinely so useful so let's get into it πŸ¦‹


🌸 NAME 🌸

waffle_feature_test_macros β€” the macros that control what definitions Waffle's headers expose to you πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

WAFFLE_API_VERSION
WAFFLE_API_EXPERIMENTAL

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: Waffle's feature test macros let you, the programmer, control the definitions that get exposed by Waffle's headers when your program is compiled ✨ And it goes both ways too β€” these macros also let you control which Waffle features your program's source relies on 🫢

Now the crucial part, like genuinely crucial, no cap: for a feature test macro to actually do anything, you have to define it before including any header files 😀 You can do that either right in the compilation command:

cc -DMACRO=value

or by defining the macro inside your source code before any of the includes happen πŸ’œ

πŸ¦‹ Specification of feature test macro requirements in manual pages πŸ¦‹

When a function needs a feature test macro to be defined, the manual page docments it in the SYNOPSIS πŸ“– And when an enum or a macro needs a feature test macro defined, the manual page documents it either in the SYNOPSIS or right where that enum or macro first shows up in the page ✨

🌈 List of feature test macros 🌈

  • WAFFLE_API_VERSION (since waffle 1.3) β€” this one controls the API version that Waffle's headers expose πŸ‘‘ The value is ((major << 8) | minor) and it exposes the API of Waffle major.minor. For example, the value 0x0103 exposes the API of Waffle 1.3 πŸ’« And if this macro is left undefined? Then the headers expose the API of Waffle 1.2 πŸ“
  • WAFFLE_API_EXPERIMENTAL β€” this one exposes experimental features in Waffle's headers πŸ§ͺ and listen, this is the chaotic one: experimental features may be altered or removed without notice, and they do not belong to Waffle's stable API 😭 so don't build your whole life on them, fr fr

πŸ’€ ISSUES πŸ’€

Please report bugs or and feature requests to https://gitlab.freedesktop.org/mesa/waffle/issues πŸ›βœ¨ (yes they said "or and", we love them for it, iconic)


πŸ‘€ SEE ALSO πŸ‘€


🫢 AUTHOR 🫢

Chad Versace <chad.versace@linux.intel.com>

  • Former maintainer πŸ‘‘

Copyright Β© 2013 Intel

This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0) πŸ“œ To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.


and that's the whole page bestie!! this one came from the waffle source, version dated 07/06/2026, and it's page WAFFLE_FEATURE_TEST_(7) in section 7 πŸ’– go forth and define your macros before your includes, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from