I have to write program which changes extensions of specific files in a folder. I've already done Linux version (which compiles with gcc) and now I wonder how should I edit it to be able to compile it in Windows (in VS) and make it work there also. It has to be one program (I can't do 2 versions, one for gcc and one for VS).
Language I have to use is C.
What I use there:
pthread.h library (multi-threading)
dirent.h library (opendir, readdir, rewinddir)
unistd.h library (chdir, usleep)
So what should I do to make it compile and work in windows and linux with the same source code on both operating systems? I know I have to scan folder and change extension with different functions in windows, but how to combine all of this into one file?