Questions
- Are the posix macros S_ISREG, S_ISDIR etc linux only? I need to find out because i am trying to compile CURL and it is trying to use them on windows
- What include file can i use to access them on windows.
This is the offending code
/*we ignore file size for char/block devices, sockets etc*/
if(S_ISREG(fileinfo.st_mode))
uploadfilesize= fileinfo.st_size;
}
and it causes an error
error LNK2019: unresolved external symbol _S_ISREG referenced in function _operate file tool_operate.obj
They are referenced in the following questions
- How to use S_ISREG() and S_ISDIR() POSIX Macros?
- Differentiate between a unix directory and file in C and C++
- Problem reading directories in C
Apparently S_ISREG() is part of a bunch of posix macros and is apparently supposed to tell us if a file is a "regular file" but all the examples I found had linux specific include files.