summaryrefslogtreecommitdiffstats
path: root/contrib/gcclibs/libcpp/include/cpplib.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-12-13 17:34:47 +0000
committered <ed@FreeBSD.org>2011-12-13 17:34:47 +0000
commit753612fc80d5cc885147f19d09ab9c64c470d50a (patch)
tree6680d81f129f0782fcd1515b1f4af7ce94045db6 /contrib/gcclibs/libcpp/include/cpplib.h
parenta105507a173a0d7935d40c66792b20bdb1f9f77d (diff)
downloadFreeBSD-src-753612fc80d5cc885147f19d09ab9c64c470d50a.zip
FreeBSD-src-753612fc80d5cc885147f19d09ab9c64c470d50a.tar.gz
Add support for __COUNTER__.
__COUNTER__ allows one to obtain incrementing (read: unique) numbers from the C preprocesor. This is useful when implementing things like a robust implementation of CTASSERT(), which currently fails when using it more than once on a single line of code. Probably not likely to cause any breakage, but still. __COUNTER__ was also added to GCC 4.3, but since that implementation is GPLv3 licensed, I took the liberty of implementing it without looking at any upstream sources. Therefore, this version is licensed under the same license as the rest of the code; GPLv2.
Diffstat (limited to 'contrib/gcclibs/libcpp/include/cpplib.h')
-rw-r--r--contrib/gcclibs/libcpp/include/cpplib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/gcclibs/libcpp/include/cpplib.h b/contrib/gcclibs/libcpp/include/cpplib.h
index 5fb80d9..c6a5efc 100644
--- a/contrib/gcclibs/libcpp/include/cpplib.h
+++ b/contrib/gcclibs/libcpp/include/cpplib.h
@@ -555,7 +555,8 @@ enum builtin_type
BT_TIME, /* `__TIME__' */
BT_STDC, /* `__STDC__' */
BT_PRAGMA, /* `_Pragma' operator */
- BT_TIMESTAMP /* `__TIMESTAMP__' */
+ BT_TIMESTAMP, /* `__TIMESTAMP__' */
+ BT_COUNTER /* `__COUNTER__' */
};
#define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE))
OpenPOWER on IntegriCloud