X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=src%2Fftdi.h;h=3d97dd9e49141e68eabe1ac88c0b9096041423a5;hp=15067c73c48f1b54b15ddfb327db9b8380dd16ff;hb=ca7d32448041e33bdb206241f210ad8961f8d10c;hpb=1cbfde9493c86c91f213746137307131180760db diff --git a/src/ftdi.h b/src/ftdi.h index 15067c7..3d97dd9 100644 --- a/src/ftdi.h +++ b/src/ftdi.h @@ -20,6 +20,18 @@ #include #include +/* 'interface' might be defined as a macro on Windows, so we need to + * undefine it so as not to break the current libftdi API, because + * struct ftdi_context has an 'interface' member + * As this can be problematic if you include windows.h after ftdi.h + * in your sources, we force windows.h to be included first. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +#include +#if defined(interface) +#undef interface +#endif +#endif + /** FTDI chip type */ enum ftdi_chip_type {