concurrentqueue icon indicating copy to clipboard operation
concurrentqueue copied to clipboard

Replace BLOCK_SIZE with CQ_BLOCK_SIZE

Open jcelerier opened this issue 3 years ago • 1 comments

As Linux defines as a C macro it in <sys/mount.h>.

So, as much as I think that Linux shouldn't define such generic-sounding macro... I don't think it'd be an easy change to get accepted upstream, but it leads to errors if for some reason <sys/mount.h> gets included before concurrentqueue, thus it's likely safer to prefix the variable name here. CQ_BLOCK_SIZE yields no matches in my /usr/include so less likely to conflict

jcelerier avatar Aug 19 '22 09:08 jcelerier

Ugh, that's annoying!

I can't change this without breaking the API. Can you not include <sys/mount.h> after concurrentqueue.h? Or undef the macro?

cameron314 avatar Aug 20 '22 19:08 cameron314

As I said, this breaks the public API, so I can't merge this as-is, sorry.

cameron314 avatar Jun 11 '23 00:06 cameron314

wops sorry, I'm just updating my personal fork and this pushes notifications here for some reason (both options you proposed I cannot do easily sadly :/)

jcelerier avatar Jun 12 '23 14:06 jcelerier