mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-22 00:32:44 +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;
|
if (filename.empty()) return MacOS::bdNamErr;
|
||||||
|
|
||||||
int access = 0;
|
int access = 0;
|
||||||
if (ioPermission != 0x33) ioPermission &= ~0x30; // drop deny read/write
|
|
||||||
switch(ioPermission)
|
|
||||||
{
|
|
||||||
case 0x33:
|
|
||||||
// PBHOpenDeny exclusive access.
|
|
||||||
access = O_RDWR | O_CREAT; // | O_EXCL;
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
// ignore the deny bits for now.
|
||||||
|
switch(ioPermission & 0x0f)
|
||||||
|
{
|
||||||
case fsWrPerm:
|
case fsWrPerm:
|
||||||
case fsRdWrPerm:
|
case fsRdWrPerm:
|
||||||
case fsRdWrShPerm:
|
case fsRdWrShPerm:
|
||||||
@ -471,7 +467,7 @@ namespace OS { namespace Internal {
|
|||||||
|
|
||||||
Log(" open(%s, %04x)\n", xname.c_str(), access);
|
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)
|
if (fd < 0 && ioPermission == fsCurPerm && errno == EACCES)
|
||||||
{
|
{
|
||||||
fd = ::open(xname.c_str(), O_RDONLY);
|
fd = ::open(xname.c_str(), O_RDONLY);
|
||||||
|
Loading…
Reference in New Issue
Block a user