Skip to content

Commit

Permalink
Fix ssize_t windows definition to be compatible with LLVM's
Browse files Browse the repository at this point in the history
  • Loading branch information
aguinetqb committed Oct 13, 2020
1 parent 517eb65 commit c483a4f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/dffi/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@
#endif

#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
// LLVM's C API defines "by hand" ssize_t. We need to do the same otherwise we
// got a conflicting type...
// #include <BaseTsd.h>
// typedef SSIZE_T ssize_t;
#if defined(_WIN64)
typedef signed __int64 ssize_t;
#else
typedef signed int ssize_t;
#endif /* _WIN64 */
#endif


Expand Down

0 comments on commit c483a4f

Please sign in to comment.