When compiling OpenBabel 2.3.0 or 2.2.3 under win32 using CygWin the following problem occurs:
[ 51%] Building CXX object src/formats/CMakeFiles/chemdrawcdx.dir/chemdrawcdx.o
/src/openbabel-2.3.0/src/formats/chemdrawcdx.cpp: In function 'short unsigned int bswap_16(short unsigned int)':
/src/openbabel-2.3.0/src/formats/chemdrawcdx.cpp:28: error: redefinition of 'short unsigned int bswap_16(short unsigned int)'
/usr/include/byteswap.h:19: error: 'short unsigned int bswap_16(short unsigned int)' previously defined here
/src/openbabel-2.3.0/src/formats/chemdrawcdx.cpp: In function 'unsigned int bswap_32(unsigned int)':
/src/openbabel-2.3.0/src/formats/chemdrawcdx.cpp:32: error: redefinition of 'unsigned int bswap_32(unsigned int)'
/usr/include/byteswap.h:25: error: 'unsigned int bswap_32(unsigned int)' previously defined here
/src/openbabel-2.3.0/src/formats/chemdrawcdx.cpp: In function 'long long unsigned int bswap_64(long long unsigned int)':
/src/openbabel-2.3.0/src/formats/chemdrawcdx.cpp:36: error: redefinition of 'long long unsigned int bswap_64(long long unsigned int)'
/usr/include/byteswap.h:31: error: 'long long unsigned int bswap_64(long long unsigned int)' previously defined here
make[2]: [src/formats/CMakeFiles/chemdrawcdx.dir/chemdrawcdx.o] Error 1
make[1]: [src/formats/CMakeFiles/chemdrawcdx.dir/all] Error 2
When the corresponding functions (bswap_16, bswap_32, bswap_64) are commented in chemdrawcdx.cpp, the compilation succeeds.
Thanks for that. I've added a corresponding #ifndef in r4493.