I did not try to run it yet and I also can't test Windows support right now.
Please test and report issues before merging.
Do not use SYSTEM for our own include files
Replace existing dirent.h for Windows with the new one, remove duplicate
Include <sys/stat.h> for mkdir
Use do_mkdir wrapper
Don't cast argument for scandir (_cdecl not supported on Posix). If this breaks windows, replace dirent prototype with int scandir(const char *dirp, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)); (from Linux manpage)
Pathname seperators are bad. My filenames are out_modelblock\model_20.bin (that's a file called like that, not a file called model_20.bin in folder out_modelblock)
I did not try to run it yet and I also can't test Windows support right now. Please test and report issues before merging.
SYSTEM
for our own include filesdirent.h
for Windows with the new one, remove duplicate<sys/stat.h>
formkdir
do_mkdir
wrapperscandir
(_cdecl not supported on Posix). If this breaks windows, replace dirent prototype withint scandir(const char *dirp, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **));
(from Linux manpage)math.h
forfloorf
\
to/