Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/util/stringify.h need to be fixed.

0001 /*                    The Quest Operating System
0002  *  Copyright (C) 2005-2010  Richard West, Boston University
0003  *
0004  *  This program is free software: you can redistribute it and/or modify
0005  *  it under the terms of the GNU General Public License as published by
0006  *  the Free Software Foundation, either version 3 of the License, or
0007  *  (at your option) any later version.
0008  *
0009  *  This program is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *  GNU General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU General Public License
0015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 /* Quick CPP macro utility adopted from Linux */
0019 
0020 #ifndef _UTIL_STRINGIFY_H_
0021 #define _UTIL_STRINGIFY_H_
0022 
0023 /* Indirect stringification.  Doing two levels allows the parameter to be a
0024  * macro itself.  For example, compile with -DFOO=bar, __stringify(FOO)
0025  * converts to "bar".
0026  */
0027 
0028 #define __stringify_1(x...)     #x
0029 #define __stringify(x...)       __stringify_1(x)
0030 
0031 #endif
0032 
0033 /*
0034  * Local Variables:
0035  * indent-tabs-mode: nil
0036  * mode: C
0037  * c-file-style: "gnu"
0038  * c-basic-offset: 2
0039  * End:
0040  */
0041 
0042 /* vi: set et sw=2 sts=2: */