Include windows.h for LONG and Interlocked functions

This commit is contained in:
Nobuyoshi Nakada 2024-11-02 22:27:03 +09:00
parent 24f7829abf
commit e2909570bb
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-11-02 14:02:24 +00:00

View File

@ -72,6 +72,8 @@ typedef unsigned int rb_atomic_t;
#elif defined(HAVE_GCC_SYNC_BUILTINS)
typedef unsigned int rb_atomic_t;
#elif defined(_WIN32)
# include <winsock2.h> // to prevent macro redefinitions
# include <windows.h> // for `LONG` and `Interlocked` functions
typedef LONG rb_atomic_t;
#elif defined(__sun) && defined(HAVE_ATOMIC_H)
typedef unsigned int rb_atomic_t;