revert previous open hack for PPCLink

This commit is contained in:
Kelvin Sherlock 2014-12-23 11:30:07 -05:00
parent e0094d199b
commit 8c811c4de9

View File

@ -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);