S_ISREG macro undefined

前端 未结 4 1992
眼角桃花
眼角桃花 2021-01-05 02:40

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
  • Wh
4条回答
  •  滥情空心
    2021-01-05 03:04

    No such thing on windows, you can use the FindFirstFile, FindNextFile win32 api, the return structure contains something similar but not the same.

    If you use gcc/mingw library they have a stat() simulation. You need to include sys/stat.h for that macro.

提交回复
热议问题