diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-10 13:16:31 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-10 13:16:31 +0100 |
commit | a32a7b58cebc2838de2ffd94e679d3e1ec9d493a (patch) | |
tree | 946d39c92a464054bcf050772eb7657315488639 /lib/buffer.h | |
parent | 7fc55925beb06059759294e0e9b7bae45465395f (diff) |
Lib: Fix macro/keyword collisions
Old code breaks with some versions of bison
Diffstat (limited to 'lib/buffer.h')
-rw-r--r-- | lib/buffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/buffer.h b/lib/buffer.h index 6fc18852..cd9bab86 100644 --- a/lib/buffer.h +++ b/lib/buffer.h @@ -13,10 +13,14 @@ #include "lib/resource.h" #include "sysdep/config.h" -#define BUFFER(type) struct { type *data; uint used, size; } +#define BUFFER_(type) struct { type *data; uint used, size; } #define BUFFER_TYPE(v) typeof(* (v).data) #define BUFFER_SIZE(v) ((v).size * sizeof(* (v).data)) +#ifndef PARSER +#define BUFFER(type) BUFFER_(type) +#endif + #define BUFFER_INIT(v,pool,isize) \ ({ \ (v).used = 0; \ |