X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=platform%2Fposix%2Ffunctions%2F_PDCLIB%2Fopen.c;fp=platform%2Fexample_cygwin%2Ffunctions%2F_PDCLIB%2Fopen.c;h=2098dd360a866b65db4a7f9a5c5a249d4f72020c;hp=4e7d2b979369b6d000d946907efe3f9bf862a53a;hb=a38d56a6a13dbb89022b5448d2d5247f3f99ea41;hpb=81f4c957d2f820d9340d90d5b650cbbed054caa0 diff --git a/platform/example_cygwin/functions/_PDCLIB/open.c b/platform/posix/functions/_PDCLIB/open.c similarity index 97% rename from platform/example_cygwin/functions/_PDCLIB/open.c rename to platform/posix/functions/_PDCLIB/open.c index 4e7d2b9..2098dd3 100644 --- a/platform/example_cygwin/functions/_PDCLIB/open.c +++ b/platform/posix/functions/_PDCLIB/open.c @@ -26,8 +26,6 @@ int _PDCLIB_open( char const * const filename, unsigned int mode ) { /* This is an example implementation of _PDCLIB_open() fit for use with POSIX kernels. - FIXME: The permissions of newly created files should not be hardcoded - here. */ int osmode; switch ( mode & ( _PDCLIB_FREAD | _PDCLIB_FWRITE | _PDCLIB_FAPPEND | _PDCLIB_FRW ) ) @@ -56,7 +54,7 @@ int _PDCLIB_open( char const * const filename, unsigned int mode ) int rc; if ( osmode & O_CREAT ) { - rc = open( filename, osmode, S_IRUSR | S_IWUSR ); + rc = open( filename, osmode, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH ); } else {