`strings.h` and `resolv.h` are not available on MSVC, and some POSIX functions are renamed or deprecated

For all of those missing/deprecated POSIX functions, we just add a macro mapping to the _underscored version of MSVC.
Fail when NULL is passed to CreateFileListInfo()

Passing NULL to sprintf() would most likely crash the program.
`CreateDirectory` might clash with the `CreateDirectoryA`/`CreateDirectoryW` macros on MSVC
MSVC also has the __FUNCTION__ predefined
A windows version for directory enumerations

Basically taken from https://github.com/danielgindi/FileDir with some adjustments
Fixed a violation of the C89 standard ("declarations must come before instructions")
Use correct `winsock2.h` version header instead of winsock.h.

`windows.h` is referring to `winsock.h` (unless the `WIN32_LEAN_AND_MEAN` is defined).
The structs used in this header are defined in `winsock2.h` or in `winsock.h`, but we are using Winsock2 of course!
So we have to include winsock2.h and refrain from including windows.h here
Just use a macro to bridge to the Win32 version of `mkdir`

The additional compat_mkdir function was not necessary at all.
Generally adjusting headers for compiling on windows without the mixing of Winsock 1 and 2.
On windows, use the Win32 calls for directory enumerations.

We also do not need the conversion between UNIX values to Windows values in the RTF_FIND_DATA struct, as we already are on windows.
Those are generally the windows headers, not just MinGW
These are UNIX headers, and are not available on MSVC
Signal is a fundamental UNIX function, and must be omitted for any windows compilation