DragonFly submit List (threaded) for 2004-11
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
5 more simple patches for usr.bin/make
Here are five more independent patches for make. The description
of the patch is at the top of the patch files. They are all cosmetic
and do not change functionality.
Max
---------------------
PatchSet 149
Date: 2000/07/28 07:50:25
Author: imp
Log:
Do include <unistd.h> for getopt interface.
Don't extern it.
Members:
main.c:1.38->1.39
Index: main.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/main.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- main.c 9 Jul 2000 05:22:51 -0000 1.38
+++ main.c 28 Jul 2000 06:50:25 -0000 1.39
@@ -95,6 +95,7 @@
#else
#include <varargs.h>
#endif
+#include <unistd.h>
#include "make.h"
#include "hash.h"
#include "dir.h"
@@ -161,8 +162,6 @@
int argc;
char **argv;
{
- extern int optind;
- extern char *optarg;
char *p;
int c;
---------------------
PatchSet 208
Date: 2001/07/26 12:02:35
Author: sheldonh
Log:
Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.
Submitted by: David Hill <david@xxxxxxxxx>
Members:
compat.c:1.21->1.22
hash.c:1.11->1.12
job.c:1.26->1.27
Index: compat.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/compat.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- compat.c 2 Dec 2000 20:24:37 -0000 1.21
+++ compat.c 26 Jul 2001 11:02:35 -0000 1.22
@@ -63,6 +63,7 @@
#include <ctype.h>
#include <errno.h>
#include <signal.h>
+#include <unistd.h>
#include "make.h"
#include "hash.h"
#include "dir.h"
@@ -328,10 +329,10 @@
if (cpid == 0) {
if (local) {
execvp(av[0], av);
- (void) write (2, av[0], strlen (av[0]));
- (void) write (2, ":", 1);
- (void) write (2, strerror(errno), strlen(strerror(errno)));
- (void) write (2, "\n", 1);
+ (void) write (STDERR_FILENO, av[0], strlen (av[0]));
+ (void) write (STDERR_FILENO, ":", 1);
+ (void) write (STDERR_FILENO, strerror(errno), strlen(strerror(errno)));
+ (void) write (STDERR_FILENO, "\n", 1);
} else {
(void)execv(av[0], av);
}
Index: hash.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/hash.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- hash.c 2 Dec 2000 18:57:58 -0000 1.11
+++ hash.c 26 Jul 2001 11:02:35 -0000 1.12
@@ -50,6 +50,7 @@
* table. Hash tables grow automatically as the amount of
* information increases.
*/
+#include <unistd.h>
#include "sprite.h"
#include "make.h"
#include "hash.h"
@@ -293,7 +294,7 @@
return;
}
}
- (void) write(2, "bad call to Hash_DeleteEntry\n", 29);
+ (void) write(STDERR_FILENO, "bad call to Hash_DeleteEntry\n", 29);
abort();
}
Index: job.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/job.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- job.c 18 Feb 2001 10:43:32 -0000 1.26
+++ job.c 26 Jul 2001 11:02:35 -0000 1.27
#ifndef OLD_JOKE
@@ -114,6 +114,7 @@
#include <stdio.h>
#include <string.h>
#include <signal.h>
+#include <unistd.h>
#include "make.h"
#include "hash.h"
#include "dir.h"
@@ -1282,7 +1283,7 @@
#endif /* REMOTE */
(void) execv(shellPath, argv);
- (void) write(2, "Could not execute shell\n",
+ (void) write(STDERR_FILENO, "Could not execute shell\n",
sizeof("Could not execute shell"));
_exit(1);
} else {
---------------------
PatchSet 219
Date: 2002/04/13 10:10:07
Author: obrien
Log:
Check to make sure fdopen() succeeds in make(1).
Submitted by: jmallett
Inspired by: NetBSD
Members:
job.c:1.29->1.30
Index: job.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/job.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- job.c 12 Apr 2002 13:23:33 -0000 1.29
+++ job.c 13 Apr 2002 09:10:07 -0000 1.30
@@ -818,6 +818,8 @@
* output file as well.
*/
out = fdopen(job->outFd, "w");
+ if (out == NULL)
+ Punt("Cannot fdopen");
} else {
out = stdout;
}
---------------------
PatchSet 228
Date: 2002/05/16 03:19:08
Author: trhodes
Log:
More consistancy. file system > filesystem
Members:
dir.c:1.21->1.22
make.h:1.17->1.18
PSD.doc/tutorial.ms:1.11->1.12
Index: dir.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/dir.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- dir.c 13 Apr 2002 10:57:56 -0000 1.21
+++ dir.c 16 May 2002 02:19:08 -0000 1.22
@@ -986,7 +986,7 @@
/*
* Only do this once -- the second time folks are checking to
* see if the file was actually updated, so we need to actually go
- * to the file system.
+ * to the filesystem.
*/
if (DEBUG(DIR)) {
printf("Using cached time %s for %s\n",
Index: make.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/make.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- make.h 13 Apr 2002 10:57:56 -0000 1.17
+++ make.h 16 May 2002 02:19:08 -0000 1.18
@@ -63,7 +63,7 @@
* The structure for an individual graph node. Each node has several
* pieces of data associated with it.
* 1) the name of the target it describes
- * 2) the location of the target file in the file system.
+ * 2) the location of the target file in the filesystem.
* 3) the type of operator used to define its sources (qv. parse.c)
* 4) whether it is involved in this invocation of make
* 5) whether the target has been remade
Index: PSD.doc/tutorial.ms
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/PSD.doc/tutorial.ms,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PSD.doc/tutorial.ms 18 Feb 2001 10:43:35 -0000 1.11
+++ PSD.doc/tutorial.ms 16 May 2002 02:19:09 -0000 1.12
@@ -1243,7 +1243,7 @@
.B \-L )
and various other information on how PMake was configured.
.Ix 0 ref configuration
-.Ix 0 ref makefile system
+.Ix 0 ref makefilesystem
.IP \fB\-i\fP
.Ix 0 def flags -i
If you give this flag, PMake will ignore non-zero status returned
@@ -2400,7 +2400,7 @@
in the normal fashion. The
.CW .h
suffix is already marked in this way in the system makefile.
-.Ix 0 ref makefile system
+.Ix 0 ref makefilesystem
E.g. if you have
.DS
\&.SUFFIXES : .bitmap
---------------------
PatchSet 236
Date: 2002/06/01 01:52:28
Author: jmallett
Log:
Remove a stray asterisk in a comment.
Members:
dir.c:1.22->1.23
Index: dir.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/dir.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- dir.c 16 May 2002 02:19:08 -0000 1.22
+++ dir.c 1 Jun 2002 00:52:28 -0000 1.23
@@ -1073,7 +1073,7 @@
* specifically instead of assuming readdir() reuturns them in
* that order when first going through a directory. This is
* needed for XFS over NFS filesystems since SGI does not
- * guarantee that these are * the first two entries returned
+ * guarantee that these are the first two entries returned
* from readdir().
*/
if (ISDOT(dp->d_name) || ISDOTDOT(dp->d_name))
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]