summaryrefslogtreecommitdiff
path: root/src/lib/cc/include.am
AgeCommit message (Collapse)Author
2019-11-07lib/cc: Define the standard C macro pasting trick in one place.Nick Mathewson
This file is a workaround for the issue that if you say `a ## b` to create a token that is the name of a macro, the C preprocessor won't expand that macro. So you can't say this: #define FOO__SQUARE(x) ((x)*(x)) #define FOO__CUBE(x) ((x)*(x)*(x)) #define FOO(func, x) FOO__##func(x) Instead, the standard C trick is to add a layer of indirection: #define PASTE(a,b) PASTE__(a,b) #define PASTE__(a,b) a ## b #define FOO__SQUARE(x) ((x)*(x)) #define FOO__CUBE(x) ((x)*(x)*(x)) #define FOO(func, x) PASTE(FOO__, func)(x) We should use this kind of trick sparingly, since it gets confusing.
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2018-11-06New macro CTASSERT(condition) to assert condition at compile-time.Taylor R Campbell
To get it, use: #include "lib/cc/ctassert.h"
2018-06-21Move compiler-compatibility headers into their own moduleNick Mathewson
This one has no generated code.