Fix for absolutely wonderful Windows feature

It turns out that Windows is more of a PoC than I ever imagined.  The
system headers will have something like this in it:

  #define __STRUCT__ struct
  #define interface __STRUCT__

which means that using the identifier "interface" will result in
completely indecipherable error messages from a Windows compiler.

That's some truly broken stinking garbage.  It's not like "interface" is
even a bad identifier.

Let's just #undef this crazy feature.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2020-08-20 14:06:46 -07:00
parent 378b9c1aec
commit 1df0e13cc4

View File

@ -24,6 +24,9 @@
#include <libdivecomputer/descriptor.h>
// Oh joy. Windows is some truly horrendously broken crap
#undef interface
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */