aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/common_funcs.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-01-11 13:32:31 -0200
committerGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-01-30 11:47:03 -0200
commitfc11aff9559da4725037c21f7a4732f5f009d975 (patch)
treef1034c4fd029f4e4867fe2b5b15352f87dbbd9b7 /src/common/common_funcs.h
parentafc416c6079f2db2c6cfae704de4c312907b3bb7 (diff)
Common: Fix SCOPE_EXIT to actually create unique identifiers.
Diffstat (limited to 'src/common/common_funcs.h')
-rw-r--r--src/common/common_funcs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index c2750a63..229eb74c 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -31,6 +31,10 @@ template<> struct CompileTimeAssert<true> {};
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+/// Textually concatenates two tokens. The double-expansion is required by the C preprocessor.
+#define CONCAT2(x, y) DO_CONCAT2(x, y)
+#define DO_CONCAT2(x, y) x ## y
+
#ifndef _MSC_VER
#include <errno.h>