basil00 / Fathom

Syzygy TB probe tool.
MIT License
17 stars 26 forks source link

Fixes for MSVC compatibility: #6

Closed jdart1 closed 8 years ago

jdart1 commented 8 years ago
  1. Allow overriding internal implementions of lsb, popcount, and bswap functions.
  2. Use _WIN32 not __WIN32__ to detect Windows/MSVC
  3. Don't import <unistd.h> if Windows
  4. Misc other fixes for places that assumed GCC.
jdart1 commented 8 years ago

Note: this only works with MSVC in C++ mode (/TP flag) because of lack of C99 support. At least this is true in VC++ 2012.

basil00 commented 8 years ago

Thanks; it looks OK but I cannot test MSVC ATM.

Most of my code is C99, but should compile as c++ in MSVC as you say.