Added a macro for concatenation of two strings, which may be macro expansions

This commit is contained in:
adamdunkels 2008-01-14 09:22:22 +00:00
parent 4c131d6975
commit 3d17762735

View file

@ -39,7 +39,7 @@
*
* This file is part of the Contiki desktop OS
*
* $Id: cc.h,v 1.4 2007/11/18 01:37:48 oliverschmidt Exp $
* $Id: cc.h,v 1.5 2008/01/14 09:22:22 adamdunkels Exp $
*
*/
#ifndef __CC_H__
@ -117,4 +117,15 @@
#ifndef NULL
#define NULL 0
#endif /* NULL */
#define CC_CONCAT2(s1, s2) s1##s2
/**
* A C preprocessing macro for concatenating to
* strings.
*
* We need use two macros (CC_CONCAT and CC_CONCAT2) in order to allow
* concatenation of two #defined macros.
*/
#define CC_CONCAT(s1, s2) CC_CONCAT2(s1, s2)
#endif /* __CC_H__ */