This commit is contained in:
rsc 2005-07-13 21:34:11 +00:00
parent f462256db2
commit a8ec4910fd
12 changed files with 18 additions and 12 deletions

View file

@ -10,8 +10,10 @@ extern "C" {
#define _BSD_SOURCE 1
#define _NETBSD_SOURCE 1 /* NetBSD */
#define _SVID_SOURCE 1
#define _XOPEN_SOURCE 1000
#define _XOPEN_SOURCE_EXTENDED 1
#ifndef __APPLE__
# define _XOPEN_SOURCE 1000
# define _XOPEN_SOURCE_EXTENDED 1
#endif
#define _LARGEFILE64_SOURCE 1
#define _FILE_OFFSET_BITS 64
@ -78,6 +80,7 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
# endif
# undef _ANSI_SOURCE
# undef _POSIX_C_SOURCE
# undef _XOPEN_SOURCE
# if !defined(NSIG)
# define NSIG 32
# endif

View file

@ -146,6 +146,7 @@ parseinfo(char *desc, char **pp)
Type *t;
char *attr;
n1 = n2 = 0;
parsenum(desc, &n1, &n2, &desc);
t = typebynum(n1, n2);
if(*desc != '='){

View file

@ -605,6 +605,7 @@ simpleaddr(void)
Addr addr;
Addr *ap, *nap;
addr.num = 0;
addr.next = 0;
addr.u.left = 0;
switch(cmdskipbl()){

View file

@ -696,6 +696,8 @@ openfile(Text *t, Expand *e)
Rune *rp;
uint dummy;
r.q0 = 0;
r.q1 = 0;
if(e->nname == 0){
w = t->w;
if(w == nil)

View file

@ -83,6 +83,7 @@ kread(ulong addr, char *buf, int size)
void
xnet(int first)
{
#if 0
ulong out, in, outb, inb, err;
static ulong ifnetaddr;
ulong addr;
@ -123,6 +124,8 @@ xnet(int first)
Bprint(&bout, "ethererr %lud\n", err);
Bprint(&bout, "ether %lud\n", in+out);
Bprint(&bout, "etherb %lud\n", inb+outb);
#endif
USED(first);
}

View file

@ -929,7 +929,7 @@ callunix(void)
*p = 0;
pid = fork();
if(pid == 0) {
execlp("rc", "rc", "-c", buf, 0);
execlp("rc", "rc", "-c", buf, (char*)0);
sysfatal("exec failed: %r");
exits("execl failed");
}

View file

@ -144,7 +144,7 @@ ysearch(char *file)
print("diff %s %s\n", pair[toggle^1], pair[toggle]);
switch(rfork(RFFDG|RFPROC)){
case 0:
execlp("diff", "diff", diffb ? "-cb" : "-c", pair[toggle], pair[toggle ^ 1], 0);
execlp("diff", "diff", diffb ? "-cb" : "-c", pair[toggle], pair[toggle ^ 1], (char*)0);
fprint(2, "can't exec diff: %r\n");
exits(0);
case -1:

View file

@ -144,11 +144,6 @@ void vgoto(double n)
vpos = n;
}
double fabs(double x)
{
return x < 0 ? -x : x;
}
void hvflush(void) /* get to proper point for output */
{
if (fabs(hpos-htrue) >= 0.0005) {

View file

@ -108,7 +108,7 @@ Bgetfield(Biobuf *bp, int type, void *thing, int size) {
while (!bailout && (r = Bgetrune(bp))>=0) {
switch (sindex++) {
case 0:
if (*c == '0') {
if (r == '0') {
base = 8;
continue;
}

View file

@ -4,9 +4,9 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
#ifndef WCOREDUMP /* not on Mac OS X Tiger */
#define WCOREDUMP(status) 0

View file

@ -91,6 +91,7 @@ auth_getinfo(AuthRpc *rpc)
if(auth_rpc(rpc, "authinfo", nil, 0) != ARok)
return nil;
a = nil;
if(convM2AI((uchar*)rpc->arg, rpc->narg, &a) == nil){
werrstr("bad auth info from factotum");
return nil;

View file

@ -115,7 +115,7 @@ static struct {
};
void
nfs3errstr(SunStatus status)
nfs3errstr(Nfs3Status status)
{
int i;