basil00/Fathom

MSVC support

jdart1 opened this issue · 3 comments

Quite a few places in the code assume GCC. For example:

__attribute__((__may_alias__) in tbcore.h
__asm__ in several places
__builtin_bswap64 and __builtin_bswap32in tbcore.c

None of these work in Microsoft's compiler (MSVC). Btw. also some places in the code test for __WIN32__.
This is not set by MSVC (it sets _WIN32. You can also use _MSC_VER if you want to test for the MSVC compiler). All but very recent MSVC also cannot compile C99. But it would work in C++ mode if the intrinsics were fixed.

This is on the TODO list but so far have not gotten around to it.

Is this issue now fixed?

I think this can be closed - MSVC compilation works now.