Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1106/22

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


64-bit fixes.
 [rsc] --rw-rw-r-- M 451989 glenda sys 275 Nov  6 11:14 sys/src/cmd/9nfs/listalloc.c
	/n/sourcesdump/2005/1106/plan9/sys/src/cmd/9nfs/listalloc.c:6,18 - 
	/n/sourcesdump/2005/1107/plan9/sys/src/cmd/9nfs/listalloc.c:6,17
	  void *
	  listalloc(long n, long size)
	  {
	- 	ulong *p, *base;
	+ 	char *p, *base;
	  
	- 	size += sizeof(ulong) - 1;
	- 	size /= sizeof(ulong);
	- 	p = base = malloc(n*size*sizeof(ulong));
	+ 	size = (size+sizeof(ulong)-1)/sizeof(ulong);
	+ 	p = base = malloc(n*size);
	  	while(--n > 0){
	- 		*p = (ulong)(p+size);
	+ 		*(char**)p = p+size;
	  		p += size;
	  	}
	  	*p = 0;
 [rsc] --rw-rw-r-- M 451989 glenda sys 9526 Nov  6 11:14 sys/src/cmd/9nfs/nfs.c
	/n/sourcesdump/2005/1106/plan9/sys/src/cmd/9nfs/nfs.c:387,393 - 
	/n/sourcesdump/2005/1107/plan9/sys/src/cmd/9nfs/nfs.c:387,393
	  		dataptr[2+n] = 0;
	  	}else{
	  		PLONG(starttime);
	- 		PLONG(xp->s);
	+ 		PLONG((u32int)(uintptr)xp->s);
	  		x = xp->qid.path;
	  		PLONG(x);
	  		x = xp->qid.path>>32;
 [rsc] --rw-rw-r-- M 451989 glenda sys 1894 Nov  6 11:14 sys/src/cmd/9nfs/xfile.c
	/n/sourcesdump/2005/1106/plan9/sys/src/cmd/9nfs/xfile.c:14,25 - 
	/n/sourcesdump/2005/1107/plan9/sys/src/cmd/9nfs/xfile.c:14,26
	  	int k;
	  	Xfile **hp, *f, *pf;
	  
	- 	k = ((ulong)qid->path ^ (((ulong)s)<<24))%FIDMOD;
	+ 	k = ((ulong)qid->path ^ (((u32int)(uintptr)s)<<24))%FIDMOD;
	  	hp = &xfiles[k];
	  
	  	lock(&xlocks[k]);
	  	for(f=*hp, pf=0; f; pf=f, f=f->next)
	- 		if(f->qid.path == qid->path && f->s == s)
	+ 		if(f->qid.path == qid->path 
	+ 		&& (u32int)(uintptr)f->s == (u32int)(uintptr)s)
	  			break;
	  	if(f && pf){
	  		pf->next = f->next;


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.