error C2065: '_S_IFDIR' : undeclared identifier
-
Trying to convert a linux project to windows, I met an error (from the subject of the post). I have a chance to use something else in windows case ?
if(S_ISDIR(type))
....where type is defined as
mode_t type
... and mode_t is another error:error C2061: syntax error : identifier 'mode_t'
how can I solve these errors ? I seek on internet and I found something like:
#if defined __WIN32__ || defined _WIN32 || defined _Windows
#if !defined S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
#endif
#endiftaken from here: c - Error: identifier "_S_IFDIR" is undefined - Stack Overflow[^]
-
Trying to convert a linux project to windows, I met an error (from the subject of the post). I have a chance to use something else in windows case ?
if(S_ISDIR(type))
....where type is defined as
mode_t type
... and mode_t is another error:error C2061: syntax error : identifier 'mode_t'
how can I solve these errors ? I seek on internet and I found something like:
#if defined __WIN32__ || defined _WIN32 || defined _Windows
#if !defined S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
#endif
#endiftaken from here: c - Error: identifier "_S_IFDIR" is undefined - Stack Overflow[^]
googling
s_isdir windows
gives this hit: [Porting To Win32!!!!](https://www.linuxquestions.org/questions/programming-9/porting-to-win32-429334/). Seems like what you want. If not, maybe one of the other 27,000 results might help? -
Trying to convert a linux project to windows, I met an error (from the subject of the post). I have a chance to use something else in windows case ?
if(S_ISDIR(type))
....where type is defined as
mode_t type
... and mode_t is another error:error C2061: syntax error : identifier 'mode_t'
how can I solve these errors ? I seek on internet and I found something like:
#if defined __WIN32__ || defined _WIN32 || defined _Windows
#if !defined S_ISDIR
#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
#endif
#endiftaken from here: c - Error: identifier "_S_IFDIR" is undefined - Stack Overflow[^]