5 more simple patches for usr.bin/make

看板DFBSD_submit作者時間21年前 (2004/11/11 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/8 (看更多)
This is a multi-part message in MIME format. --------------050809080106090504000002 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 --------------050809080106090504000002 Content-Type: text/plain; name="patch-4.0" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-4.0" --------------------- 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; --------------050809080106090504000002 Content-Type: text/plain; name="patch-4.1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-4.1" --------------------- 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@phobia.ms> 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 { --------------050809080106090504000002 Content-Type: text/plain; name="patch-4.2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-4.2" --------------------- 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; } --------------050809080106090504000002 Content-Type: text/plain; name="patch-4.3" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-4.3" --------------------- 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 --------------050809080106090504000002 Content-Type: text/plain; name="patch-4.4" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-4.4" --------------------- 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)) --------------050809080106090504000002--
文章代碼(AID): #11ahC500 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #11ahC500 (DFBSD_submit)