mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Define macros meaning <,>,==,!=,<=,>=
This lets us avoid putting operators directly in macro arguments, and thus will help us unconfuse coccinelle. For ticket 13172.
This commit is contained in:
parent
68af1e7e9b
commit
00f5909876
4
changes/ticket13172
Normal file
4
changes/ticket13172
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Code simplification and refactoring:
|
||||||
|
- Avoid using operators directly as macro arguments: this lets us
|
||||||
|
apply coccinelle transformations to our codebase more
|
||||||
|
directly. Closes ticket 13172.
|
@ -203,6 +203,15 @@ extern INLINE double U64_TO_DBL(uint64_t x) {
|
|||||||
#define STMT_END } while (0)
|
#define STMT_END } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Some tools (like coccinelle) don't like to see operators as macro
|
||||||
|
* arguments. */
|
||||||
|
#define OP_LT <
|
||||||
|
#define OP_GT >
|
||||||
|
#define OP_GE >=
|
||||||
|
#define OP_LE <=
|
||||||
|
#define OP_EQ ==
|
||||||
|
#define OP_NE !=
|
||||||
|
|
||||||
/* ===== String compatibility */
|
/* ===== String compatibility */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/* Windows names string functions differently from most other platforms. */
|
/* Windows names string functions differently from most other platforms. */
|
||||||
|
Loading…
Reference in New Issue
Block a user