Commits

Jeff Sickel  committed 8136e62

updates from Coraid

  • Participants
  • Parent commits 98aa557

Comments (0)

Files changed (6)

File Make.osx-cocoa

 # Mac OS X Cocoa version
-#   avaialable for SDK macosx10.7 or macosx10.8
+#   avaialable for SDK macosx10.7, macosx10.8, or macosx10.9
 
 SDK107=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7
 
 SDK108=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8
 
+SDK109=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9
+
 ARCHFLAGS64=-arch x86_64 -m64
 ARCHFLAGS32=-arch i386 -m32
 
 	if((err = rexcall(&data, system, srvname)))
 		fatal(1, "%s: %s", err, system);
 
-	/* Tell the remote side the command to execute and where our working directory is */
+	/* Tell the remote side the command to execute */
 	if(cflag)
 		writestr(data, cmd, "command", 0);
-	if(getcwd(dat, sizeof(dat)) == 0)
-		writestr(data, "NO", "dir", 0);
-	else
-		writestr(data, dat, "dir", 0);
+	writestr(data, "NO", "dir", 0);
 
 	/* 
 	 *  Wait for the other end to execute and start our file service

File gui-osx-cocoa/screen.m

 #define Point OSXPoint
 #define Rect OSXRect
 
-#import <Cocoa/Cocoa.h>
 #import "screen-cocoa.h"
 
 #undef Point
 #include "bigarrow.h"
 #include "docpng.h"
 
+extern int		collecting;
 extern int		kbdputc(Queue*, int);
 extern ulong	msec(void);
 
 	int		willactivate;
 } in;
 
-void initcpu(void);
+int initcpu(void);
 void	topwin(void);
 
 static void flushimg(NSRect);
 	b = in.kbuttons | in.mbuttons | in.mscroll;
 	mousetrack(dp.x, dp.y, b, msec());
 	in.mscroll = 0;
+	collecting = 0;
 }
 
 void

File kern/devcons.c

 void	(*consdebug)(void) = nil;
 void	(*screenputs)(char*, int) = nil;
 
+int collecting;
 Queue*	kbdq;			/* unprocessed console input */
 Queue*	lineq;			/* processed console input */
 Queue*	serialoq;		/* serial console output */
 		case 'k':
 			killbig("^t ^t k");
 			return;
-/* remove ^t ^t r durring cpu in
+/* remove ^t ^t r during cpu in
 		case 'r':
 			exit(0);
 			return;
 kbdputc(Queue *q, int c)
 {
 	int	i;
-	static int collecting, nk;
+	static int nk;
 	static Rune kc[5];
 
 	 if(c == Kalt){

File kern/devdraw.c

 {
 	char buf[256];
 	char *p, *q;
-	int s, left;
+	int left;
 
 	if(1|| plsprnt==0){
 		return;

File kern/devfs-posix.c

 #include	<errno.h>
 #include	<stdio.h> /* for remove, rename */
 #include	<limits.h>
+#include	<pwd.h>
+#include	<grp.h>
 
 #ifndef NAME_MAX
 #	define NAME_MAX 256
 {
 	Dir d;
 	struct stat stbuf;
+	struct passwd *pwd;
+	struct group *grp;
 	char path[MAXPATH];
 
 	if(n < BIT16SZ)
 		error(Eshortstat);
 
-	fspath(c, nil, path);
+	fspath(c, 0, path);
 	if(stat(path, &stbuf) < 0)
 		error(strerror(errno));
 
+	pwd = getpwuid(stbuf.st_uid);
+	grp = getgrgid(stbuf.st_gid);
+
 	d.name = lastelem(c);
-	d.uid = "unknown";
-	d.gid = "unknown";
-	d.muid = "unknown";
+	d.uid = pwd->pw_name;
+	d.gid = grp->gr_name;
+	d.muid = d.uid;
 	d.qid = c->qid;
 	d.mode = (c->qid.type<<24)|(stbuf.st_mode&0777);
 	d.atime = stbuf.st_atime;
 
 	uif = c->aux;
 
-	fspath(c, nil, path);
+	fspath(c, 0, path);
 	if(isdir) {
 		uif->dir = opendir(path);
 		if(uif->dir == 0)
 	int n;
 	char path[MAXPATH];
 
-	fspath(c, nil, path);
+	fspath(c, 0, path);
 	if(c->qid.type & QTDIR)
 		n = rmdir(path);
 	else
 	if(convM2D(buf, n, &d, strs) != n)
 		error(Ebadstat);
 	
-	fspath(c, nil, old);
+	fspath(c, 0, old);
 	if(stat(old, &stbuf) < 0)
 		error(strerror(errno));
 
 	uif = c->aux;
 
-	fspath(c, nil, old);
+	fspath(c, 0, old);
 	if(~d.mode != 0 && (int)(d.mode&0777) != (int)(stbuf.st_mode&0777)) {
 		if(chmod(old, d.mode&0777) < 0)
 			error(strerror(errno));
 	}
 
 	if(d.name[0] && strcmp(d.name, lastelem(c)) != 0) {
-		fspath(c, nil, old);
+		fspath(c, 0, old);
 		strcpy(new, old);
 		p = strrchr(new, '/');
 		strcpy(p+1, d.name);
 		rewinddir(uif->dir);
 	}
 
-	fspath(c, nil, dirpath);
+	fspath(c, 0, dirpath);
 
 	while(i+BIT16SZ < count) {
 		if(!p9readdir(de, uif))