summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
committersheldonh <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
commit9bfb9eedcddf3ab4e79532e863cf16c5ff381090 (patch)
treebd2ac2627dbeab7d3427432bb98d2c73085b61c1 /usr.bin/make
parent505859f37d54f23b1ebc688851be182d4e1332c8 (diff)
downloadFreeBSD-src-9bfb9eedcddf3ab4e79532e863cf16c5ff381090.zip
FreeBSD-src-9bfb9eedcddf3ab4e79532e863cf16c5ff381090.tar.gz
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>
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/compat.c9
-rw-r--r--usr.bin/make/hash.c3
-rw-r--r--usr.bin/make/job.c3
3 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index e68dd08..b4d2823 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -63,6 +63,7 @@ __RCSID("$FreeBSD$");
#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 @@ CompatRunCommand (cmdp, gnp)
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);
}
diff --git a/usr.bin/make/hash.c b/usr.bin/make/hash.c
index 684f3a6..c063f45 100644
--- a/usr.bin/make/hash.c
+++ b/usr.bin/make/hash.c
@@ -50,6 +50,7 @@ __RCSID("$FreeBSD$");
* 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 @@ Hash_DeleteEntry(t, e)
return;
}
}
- (void) write(2, "bad call to Hash_DeleteEntry\n", 29);
+ (void) write(STDERR_FILENO, "bad call to Hash_DeleteEntry\n", 29);
abort();
}
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 8fb15f2..72d3f3c 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -114,6 +114,7 @@ __RCSID("$FreeBSD$");
#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 @@ JobExec(job, argv)
#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 {
OpenPOWER on IntegriCloud