X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=platform%2Fposix%2Ffunctions%2Fstdio%2F_PDCLIB_open.c;fp=platform%2Fposix%2Ffunctions%2Fstdio%2F_PDCLIB_open.c;h=ac2fd76121067cf8a33c3a01ec9ce071a9ac3901;hp=17bd022e4f51f805a961f2b49d8c8a73f4612bed;hb=3862b03514c94f37966f61693619e6483ead6045;hpb=35d48051496adf237dcd22ff1324e93b6f351284 diff --git a/platform/posix/functions/stdio/_PDCLIB_open.c b/platform/posix/functions/stdio/_PDCLIB_open.c index 17bd022..ac2fd76 100644 --- a/platform/posix/functions/stdio/_PDCLIB_open.c +++ b/platform/posix/functions/stdio/_PDCLIB_open.c @@ -1,4 +1,4 @@ -/* _PDCLIB_open(_PDCLIB_fd_t*, const _PDCLIB_fileops_t**, +/* _PDCLIB_open(_PDCLIB_fd_t*, const _PDCLIB_fileops_t**, char const*, unsigned int) This file is part of the Public Domain C Library (PDCLib). @@ -9,9 +9,10 @@ #include <_PDCLIB_io.h> #include + extern const _PDCLIB_fileops_t _PDCLIB_fileops; -bool _PDCLIB_open( +bool _PDCLIB_open( _PDCLIB_fd_t* fd, const _PDCLIB_fileops_t** ops, char const * filename, unsigned int mode ) { @@ -40,8 +41,7 @@ bool _PDCLIB_open( return -1; } - fd->sval = open(filename, osmode, - S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); + fd->sval = open(filename, osmode, 0664); if(fd->sval == -1) { return false; }