summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-09-23 09:39:19 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-09-23 09:39:19 +0000
commit49d2284a1f93c7bde8e1f4707ee5181668877f91 (patch)
treebe8ed5a09d2421772c98ab3907f8ef42f25ef157 /usr.bin/make
parent5c8481197028ac6f2f819ac1dd7b3647d4e98540 (diff)
zap sunos bug work-around
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/job.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 59b99e97fb7..21f50fbfa98 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: job.c,v 1.80 2007/09/18 08:27:22 espie Exp $ */
+/* $OpenBSD: job.c,v 1.81 2007/09/23 09:39:18 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -191,12 +191,6 @@ static int aborting = 0; /* why is the make aborting? */
#define ABORT_INTERRUPT 2 /* Because it was interrupted */
#define ABORT_WAIT 3 /* Waiting for jobs to finish */
-/*
- * XXX: Avoid SunOS bug... FILENO() is fp->_file, and file
- * is a char! So when we go above 127 we turn negative!
- */
-#define FILENO(a) ((unsigned) fileno(a))
-
static int numCommands; /* The number of commands actually printed
* for a target. Should this number be
* 0, no shell will be executed. */
@@ -990,7 +984,7 @@ JobExec(Job *job, char **argv)
* marked close-on-exec, we must clear that bit in the new
* input.
*/
- if (dup2(FILENO(job->cmdFILE), 0) == -1)
+ if (dup2(fileno(job->cmdFILE), 0) == -1)
Punt("Cannot dup2: %s", strerror(errno));
(void)fcntl(0, F_SETFD, 0);
(void)lseek(0, 0, SEEK_SET);
@@ -1313,7 +1307,7 @@ JobStart(GNode *gn, /* target to create */
if (job->cmdFILE == NULL) {
Punt("Could not open %s", tfile);
}
- (void)fcntl(FILENO(job->cmdFILE), F_SETFD, 1);
+ (void)fcntl(fileno(job->cmdFILE), F_SETFD, 1);
/*
* Send the commands to the command file, flush all its buffers
* then rewind and remove the thing.