xref: /netbsd-src/external/gpl3/gdb.old/dist/gdbsupport/preprocessor.h (revision 6881a4007f077b54e5f51159c52b9b25f57deb0d)
1*6881a400Schristos /* Copyright (C) 2017-2023 Free Software Foundation, Inc.
27d62b00eSchristos 
37d62b00eSchristos    This file is part of GDB.
47d62b00eSchristos 
57d62b00eSchristos    This program is free software; you can redistribute it and/or modify
67d62b00eSchristos    it under the terms of the GNU General Public License as published by
77d62b00eSchristos    the Free Software Foundation; either version 3 of the License, or
87d62b00eSchristos    (at your option) any later version.
97d62b00eSchristos 
107d62b00eSchristos    This program is distributed in the hope that it will be useful,
117d62b00eSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
127d62b00eSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
137d62b00eSchristos    GNU General Public License for more details.
147d62b00eSchristos 
157d62b00eSchristos    You should have received a copy of the GNU General Public License
167d62b00eSchristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
177d62b00eSchristos 
187d62b00eSchristos #ifndef COMMON_PREPROCESSOR_H
197d62b00eSchristos #define COMMON_PREPROCESSOR_H
207d62b00eSchristos 
217d62b00eSchristos /* Generally useful preprocessor bits.  */
227d62b00eSchristos 
237d62b00eSchristos /* Concatenate two tokens.  */
247d62b00eSchristos #define CONCAT_1(a, b) a ## b
257d62b00eSchristos #define CONCAT(a, b) CONCAT_1 (a, b)
267d62b00eSchristos 
277d62b00eSchristos /* Stringification.  */
287d62b00eSchristos #define STRINGIFY_1(x) #x
297d62b00eSchristos #define STRINGIFY(x) STRINGIFY_1 (x)
307d62b00eSchristos 
317d62b00eSchristos /* Escape parens out.  Useful if you need to pass an argument that
327d62b00eSchristos    includes commas to another macro.  */
337d62b00eSchristos #define ESC_PARENS(...) __VA_ARGS__
347d62b00eSchristos 
357d62b00eSchristos #endif /* COMMON_PREPROCESSOR_H */
36