]> pd.if.org Git - pdclib.old/blobdiff - platform/posix/functions/_PDCLIB/open.c
* platform/example is now a "stub" platform - it should compile anywhere, but
[pdclib.old] / 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 4e7d2b979369b6d000d946907efe3f9bf862a53a..2098dd360a866b65db4a7f9a5c5a249d4f72020c 100644 (file)
@@ -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
     {