mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-21 09:30:55 +00:00
revert previous open hack for PPCLink
This commit is contained in:
parent
e0094d199b
commit
8c811c4de9
@ -443,14 +443,10 @@ namespace OS { namespace Internal {
|
||||
if (filename.empty()) return MacOS::bdNamErr;
|
||||
|
||||
int access = 0;
|
||||
if (ioPermission != 0x33) ioPermission &= ~0x30; // drop deny read/write
|
||||
switch(ioPermission)
|
||||
|
||||
// ignore the deny bits for now.
|
||||
switch(ioPermission & 0x0f)
|
||||
{
|
||||
case 0x33:
|
||||
// PBHOpenDeny exclusive access.
|
||||
access = O_RDWR | O_CREAT; // | O_EXCL;
|
||||
break;
|
||||
|
||||
case fsWrPerm:
|
||||
case fsRdWrPerm:
|
||||
case fsRdWrShPerm:
|
||||
@ -471,7 +467,7 @@ namespace OS { namespace Internal {
|
||||
|
||||
Log(" open(%s, %04x)\n", xname.c_str(), access);
|
||||
|
||||
fd = ::open(xname.c_str(), access, 0666);
|
||||
fd = ::open(xname.c_str(), access);
|
||||
if (fd < 0 && ioPermission == fsCurPerm && errno == EACCES)
|
||||
{
|
||||
fd = ::open(xname.c_str(), O_RDONLY);
|
||||
|
Loading…
Reference in New Issue
Block a user