In the following 4 places the mode argument should be 0777 not 07777.
src/0.c:587: I f=open(e,O_RDWR|O_CREAT|O_TRUNC,07777);
src/0.c:1130: I f=open(e,O_RDWR,07777); //Try the extended version of the filename first
src/0.c:1132: else {f=open(m,O_RDWR,07777); stat(m,&c);} //Then try the plain version
src/0.c:1225: I f=m[0]?open(m,O_RDWR|O_CREAT|(append ?0:O_TRUNC),07777):1; //stdout if m is ` or "" or "\000..."
The effect on FreeBSD is to set the suid and sgid bits. For example, I get this:
$ ./k
kona \ for help. \\ to exit.
"file" 1:("a";4 5)
\\
15:01:56 server1:~/lang/kona 10704: ls -l file*
-rwsr-sr-x 1 bakul bakul 112 Nov 2 15:01 file.K
Note the s instead x for user and group.
Another issue is that the file extension should be .l but it is .K on FreeBSD and Linux. It is correct on macOS.
In the following 4 places the mode argument should be
0777
not07777
.The effect on FreeBSD is to set the
suid
andsgid
bits. For example, I get this:Note the
s
insteadx
for user and group.Another issue is that the file extension should be
.l
but it is.K
on FreeBSD and Linux. It is correct on macOS.