Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1119/14

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


64-bit fixes.
 [jmk] --rw-rw-r-- M 107020 glenda sys 25875 Nov 19 20:55 sys/src/cmd/aux/depend.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/aux/depend.c:5,10 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/aux/depend.c:5,17
	  #include <thread.h>
	  #include <bio.h>
	  
	+ typedef struct Args Args;
	+ 
	+ struct Args {
	+ 	int	argc;
	+ 	char	**argv;
	+ };
	+ 
	  typedef struct Dfile Dfile;
	  typedef struct Fid Fid;
	  typedef struct File File;
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/aux/depend.c:258,268 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/aux/depend.c:265,277
	  	int srv;
	  	char service[128];
	  	struct Fsarg fsarg;
	+ 	Args *args;
	  	int argc;
	  	char **argv;
	  
	- 	argc = (int)((void**)a)[0];
	- 	argv = ((void**)a)[1];
	+ 	args = a;
	+ 	argc = args->argc;
	+ 	argv = args->argv;
	  
	  	fmtinstall('F', fcallfmt);
	  
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/aux/depend.c:272,278 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/aux/depend.c:281,287
	  			break;
	  	}ARGEND
	  	if(argc != 2){
	- 		fprint(2, "usage: %s [-d] svc-name directory", argv0);
	+ 		fprint(2, "usage: %s [-d] svc-name directory\n", argv0);
	  		exits("usage");
	  	}
	  	snprint(service, sizeof service, "#s/%s", argv[0]);
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/aux/depend.c:307,318 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/aux/depend.c:316,327
	  void
	  threadmain(int argc, char *argv[])
	  {
	- 	static void *a[2];
	+ 	static Args args;
	  
	- 	a[0] = (void*)argc;
	- 	a[1] = argv;
	+ 	args.argc = argc;
	+ 	args.argv = argv;
	  	rfork(RFNAMEG);
	- 	proccreate(realmain, a, 16*1024);
	+ 	proccreate(realmain, &args, 16*1024);
	  }
	  
	  char*


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].