Closed syrel closed 5 months ago
Hi The following commit https://github.com/pharo-project/pharo-vm/commit/e2c5e056a793fb7d21c506713d441d62c8b9d76a introduced a regression on Windows because S_ISDIR is a POSIX macros which is not available on Windows:
S_ISDIR
https://github.com/pharo-project/pharo-vm/blob/e2c5e056a793fb7d21c506713d441d62c8b9d76a/src/imageAccess.c#L192-L200
It is recommended to add the following compatibility definition after #include <sys/stat.h> when compiling for Windows using MSVC:
#include <sys/stat.h>
#ifdef _WIN32 #ifndef _S_ISTYPE #define _S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask)) #define S_ISREG(mode) _S_ISTYPE((mode), _S_IFREG) #define S_ISDIR(mode) _S_ISTYPE((mode), _S_IFDIR) #endif #endif
Hi @syrel , thanks for checking this! Indeed, we don't have the MSVC build integrated in our CI yet, that's why we did not see it.
Would you mind issuing a PR? Thanks a lot!
Hi The following commit https://github.com/pharo-project/pharo-vm/commit/e2c5e056a793fb7d21c506713d441d62c8b9d76a introduced a regression on Windows because
S_ISDIR
is a POSIX macros which is not available on Windows:https://github.com/pharo-project/pharo-vm/blob/e2c5e056a793fb7d21c506713d441d62c8b9d76a/src/imageAccess.c#L192-L200
It is recommended to add the following compatibility definition after
#include <sys/stat.h>
when compiling for Windows using MSVC: