# HG changeset patch # User Andrew Choi # Date 999579604 0 # Node ID 9647ef27680a81c6ec3c3eb2d5870de0e21fe7bd # Parent 6e45d26a25553af85ac1836719f9c548547b6653 2001-09-04 Andrew Choi * src/mac.c (stat): Don't fail for aliases. (sys_open) [__MRC__]: Set file creator and type for newly-created files. diff -r 6e45d26a2555 -r 9647ef27680a mac/ChangeLog --- a/mac/ChangeLog Tue Sep 04 03:43:23 2001 +0000 +++ b/mac/ChangeLog Tue Sep 04 05:00:04 2001 +0000 @@ -1,3 +1,9 @@ +2001-09-04 Andrew Choi + + * src/mac.c (stat): Don't fail for aliases. + (sys_open) [__MRC__]: Set file creator and type for newly-created + files. + 2001-08-24 Andrew Choi * src/macterm.c (init_font_name_table): Add an additional entry to diff -r 6e45d26a2555 -r 9647ef27680a mac/src/mac.c --- a/mac/src/mac.c Tue Sep 04 03:43:23 2001 +0000 +++ b/mac/src/mac.c Tue Sep 04 05:00:04 2001 +0000 @@ -330,8 +330,8 @@ if (cipb.hFileInfo.ioFlFndrInfo.fdFlags & 0x8000) { /* identify alias files as symlinks */ + buf->st_mode &= ~S_IFREG; buf->st_mode |= S_IFLNK; - buf->st_mode &= ~S_IFREG; } buf->st_nlink = 1; @@ -367,7 +367,8 @@ char true_pathname[MAXPATHLEN+1], fully_resolved_name[MAXPATHLEN+1]; int len; - if ((result = stat_noalias (path, sb)) >= 0) + if ((result = stat_noalias (path, sb)) >= 0 && + ! (sb->st_mode & S_IFLNK)) return result; if (find_true_pathname (path, true_pathname, MAXPATHLEN+1) == -1) @@ -605,10 +606,14 @@ else { #ifdef __MRC__ - if (oflag == O_WRONLY || oflag == O_RDWR) + int res = open (mac_pathname, oflag); + /* if (oflag == O_WRONLY || oflag == O_RDWR) */ + if (oflag & O_CREAT) fsetfileinfo (mac_pathname, 'EMAx', 'TEXT'); + return res; +#else + return open (mac_pathname, oflag); #endif - return open (mac_pathname, oflag); } }