request for review and testing: default file name

Jef Driesen jefdriesen at telenet.be
Mon Sep 10 23:49:57 PDT 2012


On 2012-09-11 03:46, Dirk Hohndel wrote:
> "Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>> once again windows is different - "io.h" has mkdir accepting only 
>> one
>> parameter :-(:
>> a naive solution in the attached patch.
>
> Yeah, that solution won't work for me. I don't want #ifdefs in the 
> code.
> I guess I'll have to do platform specific functions in
> linux.c/macos.c/window.c
> unless I can find another API function that is consistent between the
> platforms and works for our purposes. I guess I shouldn't be 
> surprised
> that Windows isn't POSIX compatible for functions like this given 
> that
> the access controls on the filesystem level work quite differently.

Glib already has cross-platform wrapper functions for many file I/O 
functions (and others). Look for g_mkdir().

http://developer.gnome.org/glib/2.28/glib-File-Utilities.html#g-mkdir

Jef


More information about the subsurface mailing list