summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2010-11-14 19:36:55 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2010-11-14 19:36:55 +0000
commit4a1c526e45ce522994439d64beff897faf2cffda (patch)
treeb27e535354e4e94769bc96562183a5bfd7923f1c /bin
parentdb62abd66696a32766f5075f07e7768780c087ef (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/expand.c15
-rw-r--r--bin/sh/jobs.c26
2 files changed, 21 insertions, 20 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 8a909aba1ff7..f2361916a70c 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -43,14 +43,15 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
-#include <errno.h>
#include <dirent.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <stdlib.h>
+#include <errno.h>
+#include <inttypes.h>
#include <limits.h>
+#include <pwd.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
/*
* Routines to expand arguments to commands. We have to deal with
@@ -491,9 +492,9 @@ expbackq(union node *cmd, int quoted, int flag)
exitstatus = waitforjob(in.jp, (int *)NULL);
if (quoted == 0)
recordregion(startloc, dest - stackblock(), 0);
- TRACE(("evalbackq: size=%d: \"%.*s\"\n",
- (dest - stackblock()) - startloc,
- (dest - stackblock()) - startloc,
+ TRACE(("expbackq: size=%td: \"%.*s\"\n",
+ ((dest - stackblock()) - startloc),
+ (int)((dest - stackblock()) - startloc),
stackblock() + startloc));
expdest = dest;
INTON;
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 92a297c19327..70754db34223 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -38,18 +38,18 @@ static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <fcntl.h>
-#include <signal.h>
-#include <errno.h>
-#include <paths.h>
-#include <unistd.h>
-#include <stdlib.h>
+#include <sys/ioctl.h>
#include <sys/param.h>
-#include <sys/wait.h>
-#include <sys/time.h>
#include <sys/resource.h>
+#include <sys/stddef.h>
+#include <sys/time.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <fcntl.h>
#include <paths.h>
-#include <sys/ioctl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
#include "shell.h"
#if JOBS
@@ -653,7 +653,7 @@ makejob(union node *node __unused, int nprocs)
jp->ps = &jp->ps0;
}
INTON;
- TRACE(("makejob(%p, %d) returns %%%d\n", (void *)node, nprocs,
+ TRACE(("makejob(%p, %d) returns %%%td\n", (void *)node, nprocs,
jp - jobtab + 1));
return jp;
}
@@ -739,7 +739,7 @@ forkshell(struct job *jp, union node *n, int mode)
pid_t pid;
pid_t pgrp;
- TRACE(("forkshell(%%%d, %p, %d) called\n", jp - jobtab, (void *)n,
+ TRACE(("forkshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n,
mode));
INTOFF;
flushall();
@@ -868,7 +868,7 @@ waitforjob(struct job *jp, int *origstatus)
int st;
INTOFF;
- TRACE(("waitforjob(%%%d) called\n", jp - jobtab + 1));
+ TRACE(("waitforjob(%%%td) called\n", jp - jobtab + 1));
while (jp->state == 0)
if (dowait(1, jp) == -1)
dotrap();
@@ -969,7 +969,7 @@ dowait(int block, struct job *job)
if (stopped) { /* stopped or done */
int state = done? JOBDONE : JOBSTOPPED;
if (jp->state != state) {
- TRACE(("Job %d: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state));
+ TRACE(("Job %td: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state));
jp->state = state;
#if JOBS
if (done)