xref: /linux/tools/include/linux/stringify.h (revision 737ef7d32cb41d19f0e1fd4d9ad0916f42d2f448)
1*737ef7d3SArnaldo Carvalho de Melo #ifndef __LINUX_STRINGIFY_H
2*737ef7d3SArnaldo Carvalho de Melo #define __LINUX_STRINGIFY_H
3*737ef7d3SArnaldo Carvalho de Melo 
4*737ef7d3SArnaldo Carvalho de Melo /* Indirect stringification.  Doing two levels allows the parameter to be a
5*737ef7d3SArnaldo Carvalho de Melo  * macro itself.  For example, compile with -DFOO=bar, __stringify(FOO)
6*737ef7d3SArnaldo Carvalho de Melo  * converts to "bar".
7*737ef7d3SArnaldo Carvalho de Melo  */
8*737ef7d3SArnaldo Carvalho de Melo 
9*737ef7d3SArnaldo Carvalho de Melo #define __stringify_1(x...)	#x
10*737ef7d3SArnaldo Carvalho de Melo #define __stringify(x...)	__stringify_1(x)
11*737ef7d3SArnaldo Carvalho de Melo 
12*737ef7d3SArnaldo Carvalho de Melo #endif	/* !__LINUX_STRINGIFY_H */
13