Subject: re: bin/29435
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Max Okumoto <okumoto@ucsd.edu>
List: netbsd-bugs
Date: 02/18/2005 00:56:02
The following reply was made to PR bin/29435; it has been noted by GNATS.
From: Max Okumoto <okumoto@ucsd.edu>
To: gnats-bugs@netbsd.org
Cc:
Subject: re: bin/29435
Date: Thu, 17 Feb 2005 16:55:01 -0800
This is a multi-part message in MIME format.
--------------000202080704060304030101
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Update to PR with patch
--------------000202080704060304030101
Content-Type: text/plain;
name="p5"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="p5"
diff -ru nbsd-src/make.orig/arch.c nbsd-src/make/arch.c
--- nbsd-src/make.orig/arch.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/arch.c Thu Feb 17 15:01:08 2005
@@ -420,7 +420,7 @@
* end of the provided list.
*/
gn->type |= OP_ARCHV;
- (void) Lst_AtEnd(nodeLst, (ClientData)gn);
+ (void)Lst_AtEnd(nodeLst, (ClientData)gn);
}
}
Lst_Destroy(members, NOFREE);
@@ -442,7 +442,7 @@
* provided list.
*/
gn->type |= OP_ARCHV;
- (void) Lst_AtEnd(nodeLst, (ClientData)gn);
+ (void)Lst_AtEnd(nodeLst, (ClientData)gn);
}
}
if (doSubst) {
@@ -684,7 +684,7 @@
#endif
he = Hash_CreateEntry(&ar->members, memName, (Boolean *)NULL);
- Hash_SetValue (he, emalloc (sizeof(struct ar_hdr)));
+ Hash_SetValue (he, emalloc(sizeof(struct ar_hdr)));
memcpy ((Address)Hash_GetValue (he), (Address)&arh,
sizeof(struct ar_hdr));
}
@@ -693,7 +693,7 @@
fclose (arch);
- (void) Lst_AtEnd(archives, (ClientData) ar);
+ (void)Lst_AtEnd(archives, (ClientData) ar);
/*
* Now that the archive has been read and cached, we can look into
diff -ru nbsd-src/make.orig/cond.c nbsd-src/make/cond.c
--- nbsd-src/make.orig/cond.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/cond.c Thu Feb 17 15:01:13 2005
@@ -1064,7 +1064,7 @@
if (l == True) {
l = CondF(doEval);
} else {
- (void) CondF(FALSE);
+ (void)CondF(FALSE);
}
} else {
/*
@@ -1111,7 +1111,7 @@
if (l == False) {
l = CondE(doEval);
} else {
- (void) CondE(FALSE);
+ (void)CondE(FALSE);
}
} else {
/*
diff -ru nbsd-src/make.orig/dir.c nbsd-src/make/dir.c
--- nbsd-src/make.orig/dir.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/dir.c Thu Feb 17 15:01:16 2005
@@ -326,7 +326,7 @@
/* Remove old entry from openDirectories, but do not destroy. */
ln = Lst_Member(openDirectories, (ClientData)dot);
- (void) Lst_Remove(openDirectories, ln);
+ (void)Lst_Remove(openDirectories, ln);
}
dot = Dir_AddDir(NULL, ".");
@@ -808,7 +808,7 @@
if (*dp == '/')
*dp = '\0';
path = Lst_Init(FALSE);
- (void) Dir_AddDir(path, dirpath);
+ (void)Dir_AddDir(path, dirpath);
DirExpandInt(cp+1, path, expansions);
Lst_Destroy(path, NOFREE);
}
@@ -1177,7 +1177,7 @@
return file;
}
- (void) Lst_Open(path);
+ (void)Lst_Open(path);
while ((ln = Lst_Next(path)) != NILLNODE) {
p = (Path *) Lst_Datum(ln);
if (p == dotLast)
@@ -1233,7 +1233,7 @@
if (!hasLastDot && cur && (file = DirLookupAbs(cur, name, cp)) != NULL)
return *file?file:NULL;
- (void) Lst_Open(path);
+ (void)Lst_Open(path);
while ((ln = Lst_Next(path)) != NILLNODE) {
p = (Path *) Lst_Datum(ln);
if (p == dotLast)
@@ -1268,7 +1268,7 @@
*/
#ifdef notdef
cp[-1] = '\0';
- (void) Dir_AddDir(path, name);
+ (void)Dir_AddDir(path, name);
cp[-1] = '/';
bigmisses += 1;
@@ -1644,7 +1644,7 @@
LstNode ln;
ln = Lst_Member(openDirectories, (ClientData)p);
- (void) Lst_Remove(openDirectories, ln);
+ (void)Lst_Remove(openDirectories, ln);
Hash_DeleteTable(&p->files);
free((Address)p->name);
diff -ru nbsd-src/make.orig/job.c nbsd-src/make/job.c
--- nbsd-src/make.orig/job.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/job.c Thu Feb 17 15:01:24 2005
@@ -889,7 +889,7 @@
JobSaveCommand(ClientData cmd, ClientData gn)
{
cmd = (ClientData) Var_Subst(NULL, (char *) cmd, (GNode *) gn, FALSE);
- (void) Lst_AtEnd(postCommands->commands, cmd);
+ (void)Lst_AtEnd(postCommands->commands, cmd);
return(0);
}
@@ -1601,7 +1601,7 @@
job->node->name, job->pid);
}
nJobs += 1;
- (void) Lst_AtEnd(jobs, (ClientData)job);
+ (void)Lst_AtEnd(jobs, (ClientData)job);
JobSigUnlock(&mask);
}
@@ -1877,7 +1877,7 @@
(void) fprintf(stdout, "table full\n");
(void) fflush(stdout);
}
- (void) Lst_AtFront(stoppedJobs, (ClientData)job);
+ (void)Lst_AtFront(stoppedJobs, (ClientData)job);
return 1;
}
}
@@ -1985,7 +1985,7 @@
(void)strcpy(tfile, TMPPAT);
if ((tfd = mkstemp(tfile)) == -1)
Punt("Could not create temporary file %s", strerror(errno));
- (void) eunlink(tfile);
+ (void)eunlink(tfile);
JobSigUnlock(&mask);
job->cmdFILE = fdopen(tfd, "w+");
@@ -2192,7 +2192,7 @@
* be run locally if maxLocal is 0.
*/
job->flags |= JOB_RESTART;
- (void) Lst_AtEnd(stoppedJobs, (ClientData)job);
+ (void)Lst_AtEnd(stoppedJobs, (ClientData)job);
} else {
JobExec(job, argv);
}
@@ -2443,7 +2443,7 @@
}
}
(void) fclose(oFILE);
- (void) eunlink(job->outFile);
+ (void)eunlink(job->outFile);
} else {
Punt("Cannot open `%s'", job->outFile);
}
@@ -2505,14 +2505,14 @@
continue;
}
job = (Job *)Lst_Datum(jnode);
- (void) Lst_Remove(stoppedJobs, jnode);
+ (void)Lst_Remove(stoppedJobs, jnode);
} else {
Error("Child (%d) not in table?", pid);
continue;
}
} else {
job = (Job *) Lst_Datum(jnode);
- (void) Lst_Remove(jobs, jnode);
+ (void)Lst_Remove(jobs, jnode);
nJobs -= 1;
#ifdef REMOTE
if (!(job->flags & JOB_REMOTE)) {
@@ -2631,7 +2631,7 @@
void
Job_Make(GNode *gn)
{
- (void) JobStart(gn, 0, NULL);
+ (void)JobStart(gn, 0, NULL);
}
void
@@ -3065,7 +3065,7 @@
JobSigLock(&mask);
- (void) Lst_Open(jobs);
+ (void)Lst_Open(jobs);
while ((ln = Lst_Next(jobs)) != NILLNODE) {
GNode *gn;
@@ -3303,7 +3303,7 @@
if (nJobs) {
JobSigLock(&mask);
- (void) Lst_Open(jobs);
+ (void)Lst_Open(jobs);
while ((ln = Lst_Next(jobs)) != NILLNODE) {
job = (Job *) Lst_Datum(ln);
diff -ru nbsd-src/make.orig/main.c nbsd-src/make/main.c
--- nbsd-src/make.orig/main.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/main.c Thu Feb 17 15:01:28 2005
@@ -444,10 +444,10 @@
if (!Dir_FindHereOrAbove(curdir, optarg+4,
found_path, sizeof(found_path)))
break; /* nothing doing */
- (void) Dir_AddDir(sysIncPath, found_path);
+ (void)Dir_AddDir(sysIncPath, found_path);
} else {
- (void) Dir_AddDir(sysIncPath, optarg);
+ (void)Dir_AddDir(sysIncPath, optarg);
}
Var_Append(MAKEFLAGS, "-m", VAR_GLOBAL);
Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL);
@@ -738,19 +738,19 @@
* of these paths exist, just use .CURDIR.
*/
Dir_Init(curdir);
- (void) Main_SetObjdir(curdir);
+ (void)Main_SetObjdir(curdir);
if ((path = getenv("MAKEOBJDIRPREFIX")) != NULL) {
- (void) snprintf(mdpath, MAXPATHLEN, "%s%s", path, curdir);
- (void) Main_SetObjdir(mdpath);
+ (void)snprintf(mdpath, MAXPATHLEN, "%s%s", path, curdir);
+ (void)Main_SetObjdir(mdpath);
} else if ((path = getenv("MAKEOBJDIR")) != NULL) {
- (void) Main_SetObjdir(path);
+ (void)Main_SetObjdir(path);
} else {
- (void) snprintf(mdpath, MAXPATHLEN, "%s.%s", _PATH_OBJDIR, machine);
+ (void)snprintf(mdpath, MAXPATHLEN, "%s.%s", _PATH_OBJDIR, machine);
if (!Main_SetObjdir(mdpath) && !Main_SetObjdir(_PATH_OBJDIR)) {
- (void) snprintf(mdpath, MAXPATHLEN, "%s%s",
+ (void)snprintf(mdpath, MAXPATHLEN, "%s%s",
_PATH_OBJDIRPREFIX, curdir);
- (void) Main_SetObjdir(mdpath);
+ (void)Main_SetObjdir(mdpath);
}
}
@@ -871,11 +871,11 @@
}
/* look for magic parent directory search string */
if (strncmp(".../", start, 4) != 0) {
- (void) Dir_AddDir(defIncPath, start);
+ (void)Dir_AddDir(defIncPath, start);
} else {
if (Dir_FindHereOrAbove(curdir, start+4,
found_path, sizeof(found_path))) {
- (void) Dir_AddDir(defIncPath, found_path);
+ (void)Dir_AddDir(defIncPath, found_path);
}
}
}
@@ -955,7 +955,7 @@
savec = *cp;
*cp = '\0';
/* Add directory to search path */
- (void) Dir_AddDir(dirSearchPath, path);
+ (void)Dir_AddDir(dirSearchPath, path);
*cp = savec;
path = cp + 1;
} while (savec == ':');
diff -ru nbsd-src/make.orig/make.c nbsd-src/make/make.c
--- nbsd-src/make.orig/make.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/make.c Thu Feb 17 15:01:30 2005
@@ -204,7 +204,7 @@
* doesn't depend on their modification time...
*/
if ((gn->type & (OP_JOIN|OP_USE|OP_USEBEFORE|OP_EXEC)) == 0) {
- (void) Dir_MTime(gn);
+ (void)Dir_MTime(gn);
if (DEBUG(MAKE)) {
if (gn->mtime != 0) {
printf ("modified %s...", Targ_FmtTime(gn->mtime));
@@ -379,7 +379,7 @@
GNode *gn = (GNode *) gnp;
GNode *pgn = (GNode *) pgnp;
- (void) Dir_MTime(gn);
+ (void)Dir_MTime(gn);
Make_TimeStamp(pgn, gn);
pgn->unmade--;
@@ -431,14 +431,14 @@
*/
Lst cmds = pgn->commands;
pgn->commands = Lst_Duplicate(cgn->commands, NOCOPY);
- (void) Lst_Concat(pgn->commands, cmds, LST_CONCNEW);
+ (void)Lst_Concat(pgn->commands, cmds, LST_CONCNEW);
Lst_Destroy(cmds, NOFREE);
} else {
/*
* .USE or target has no commands --
* append the child's commands to the parent.
*/
- (void) Lst_Concat(pgn->commands, cgn->commands, LST_CONCNEW);
+ (void)Lst_Concat(pgn->commands, cgn->commands, LST_CONCNEW);
}
}
@@ -466,8 +466,8 @@
gn = tgn;
}
- (void) Lst_AtEnd(pgn->children, gn);
- (void) Lst_AtEnd(gn->parents, pgn);
+ (void)Lst_AtEnd(pgn->children, gn);
+ (void)Lst_AtEnd(gn->parents, pgn);
pgn->unmade += 1;
}
Lst_Close(cgn->children);
@@ -1198,7 +1198,7 @@
* the finishing of a job. So we fill the Job table as much as we can
* before going into our loop.
*/
- (void) MakeStartJobs();
+ (void)MakeStartJobs();
}
/*
diff -ru nbsd-src/make.orig/parse.c nbsd-src/make/parse.c
--- nbsd-src/make.orig/parse.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/parse.c Thu Feb 17 15:01:35 2005
@@ -755,7 +755,7 @@
* invoked if the user didn't specify a target on the command
* line. This is to allow #ifmake's to succeed, or something...
*/
- (void) Lst_AtEnd(create, (ClientData)estrdup(src));
+ (void)Lst_AtEnd(create, (ClientData)estrdup(src));
/*
* Add the name to the .TARGETS variable as well, so the user cna
* employ that, if desired.
@@ -868,7 +868,7 @@
static int
ParseAddDir(ClientData path, ClientData name)
{
- (void) Dir_AddDir((Lst) path, (char *) name);
+ (void)Dir_AddDir((Lst) path, (char *) name);
return(0);
}
@@ -1834,7 +1834,7 @@
void
Parse_AddIncludeDir(char *dir)
{
- (void) Dir_AddDir(parseIncPath, dir);
+ (void)Dir_AddDir(parseIncPath, dir);
}
/*-
@@ -1994,7 +1994,7 @@
memcpy(oldFile, &curFile, sizeof(IFile));
- (void) Lst_AtFront(includes, (ClientData)oldFile);
+ (void)Lst_AtFront(includes, (ClientData)oldFile);
/*
* Once the previous state has been saved, we can get down to reading
@@ -2016,7 +2016,7 @@
/*
* Pop to previous file
*/
- (void) ParseEOF(0);
+ (void)ParseEOF(0);
}
}
@@ -2077,7 +2077,7 @@
oldFile = emalloc(sizeof(IFile));
memcpy(oldFile, &curFile, sizeof(IFile));
- (void) Lst_AtFront(includes, (ClientData)oldFile);
+ (void)Lst_AtFront(includes, (ClientData)oldFile);
curFile.F = NULL;
curFile.P = emalloc(sizeof(PTR));
@@ -2219,7 +2219,7 @@
oldFile = emalloc(sizeof(IFile));
memcpy(oldFile, &curFile, sizeof(IFile));
- (void) Lst_AtFront(includes, (ClientData)oldFile);
+ (void)Lst_AtFront(includes, (ClientData)oldFile);
/*
* Once the previous state has been saved, we can get down to
@@ -2240,7 +2240,7 @@
/*
* Pop to previous file
*/
- (void) ParseEOF(1);
+ (void)ParseEOF(1);
}
}
}
@@ -2954,11 +2954,11 @@
Punt("no target to make.");
/*NOTREACHED*/
} else if (mainNode->type & OP_DOUBLEDEP) {
- (void) Lst_AtEnd(mainList, (ClientData)mainNode);
+ (void)Lst_AtEnd(mainList, (ClientData)mainNode);
Lst_Concat(mainList, mainNode->cohorts, LST_CONCNEW);
}
else
- (void) Lst_AtEnd(mainList, (ClientData)mainNode);
+ (void)Lst_AtEnd(mainList, (ClientData)mainNode);
Var_Append(".TARGETS", mainNode->name, VAR_GLOBAL);
return (mainList);
}
diff -ru nbsd-src/make.orig/suff.c nbsd-src/make/suff.c
--- nbsd-src/make.orig/suff.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/suff.c Thu Feb 17 15:01:41 2005
@@ -1413,7 +1413,7 @@
char *cp;
t = targ->node;
- (void) Lst_Open(t->children);
+ (void)Lst_Open(t->children);
prefLen = strlen (targ->pref);
for (;;) {
diff -ru nbsd-src/make.orig/targ.c nbsd-src/make/targ.c
--- nbsd-src/make.orig/targ.c Thu Feb 17 14:53:20 2005
+++ nbsd-src/make/targ.c Thu Feb 17 15:01:42 2005
@@ -336,7 +336,7 @@
gn = Targ_NewGN(name);
Hash_SetValue (he, gn);
Var_Append(".ALLTARGETS", name, VAR_GLOBAL);
- (void) Lst_AtEnd(allTargets, (ClientData)gn);
+ (void)Lst_AtEnd(allTargets, (ClientData)gn);
}
} else {
he = Hash_FindEntry(&targets, name);
@@ -390,7 +390,7 @@
* are added to the list in the order in which they were
* encountered in the makefile.
*/
- (void) Lst_AtEnd(nodes, (ClientData)gn);
+ (void)Lst_AtEnd(nodes, (ClientData)gn);
} else if (flags == TARG_NOCREATE) {
Error("\"%s\" -- target unknown.", name);
}
--------------000202080704060304030101--