commit 22c7ebffdade6036f5b46347f6a6ca41023c6253 from: rsc date: Tue Dec 28 01:45:05 2004 UTC more little compile fixes commit - 7ffc5208a82cd7339c125956a9702ac08c0ff2f4 commit + 22c7ebffdade6036f5b46347f6a6ca41023c6253 blob - a26781c0f1eaf65f5c72d4fcae7589c2d22bbd98 blob + 44718009ef5d0c1136b0442bdf5d6d96f584e034 --- src/cmd/acid/acid.h +++ src/cmd/acid/acid.h @@ -256,7 +256,6 @@ void unwind(void); void userinit(void); void varreg(void); void varsym(void); -Waitmsg* waitfor(int); void whatis(Lsym*); void windir(Map*, Node*, Node*, Node*); void yyerror(char*, ...); blob - 66996345b51bb3593f4138c398ca65dc4a9c41f0 blob + a0aed614039dfb7b82164ea8944e6fb2844804c1 --- src/cmd/acid/proc.c +++ src/cmd/acid/proc.c @@ -245,17 +245,3 @@ getstatus(int pid) return buf+56; /* ditto */ } -Waitmsg* -waitfor(int pid) -{ - Waitmsg *w; - - for(;;) { - if((w = wait()) == nil) - error("wait %r"); - if(w->pid == pid) - return w; - free(w); - } - return nil; /* ken */ -} blob - 2c9f46a38c7a6e89b415eb853a6f6b9802c9bc57 blob + 0a084a654e4e23cbb0bd46e557d8fe31a93cf1d1 --- src/cmd/mk/fns.h +++ src/cmd/mk/fns.h @@ -1,3 +1,6 @@ +#undef waitfor +#define waitfor mkwaitfor + void addrule(char*, Word*, char*, Word*, int, int, char*); void addrules(Word*, Word*, char*, int, int, char*); void addw(Word*, char*); blob - 1ab2b49539307b9712968577a67529429daf439d blob + 0641be81a239f44c8d6abba9f8f5f53cac9ef293 --- src/cmd/sam/sam.h +++ src/cmd/sam/sam.h @@ -3,6 +3,9 @@ #include #include "errors.h" +#undef waitfor +#define waitfor samwaitfor + /* * BLOCKSIZE is relatively small to keep memory consumption down. */ blob - 162ba74f87daccf884efbe4bf2e70a423a4b1a0d blob + 2505f854c6166e7c55a50f31f4d3bdd9535c1b8a --- src/cmd/sam/unix.c +++ src/cmd/sam/unix.c @@ -177,17 +177,21 @@ tempdisk(void) return fd; } -#undef wait +#undef waitfor int -waitfor(int pid) +samwaitfor(int pid) { - int wm; - int rpid; - - do; while((rpid = wait(&wm)) != pid && rpid != -1); - return (WEXITSTATUS(wm)); -} + int r; + Waitmsg *w; + w = p9waitfor(pid); + if(w == nil) + return -1; + r = atoi(w->msg); + free(w); + return r; +} + void samerr(char *buf) { blob - cdcb9bb53e816d63d4748a628eff512bea44eaec blob + 144aaf69ef0164a1327111a0da4dd90dd82470db --- src/libsec/port/aes.c +++ src/libsec/port/aes.c @@ -43,9 +43,9 @@ static const u32 Td3[256]; static const u8 Te4[256]; static int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); -/* +#ifdef NOTUSED static int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); -*/ +#endif static int rijndaelKeySetup(u32 erk[/*4*(Nr + 1)*/], u32 drk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); static void rijndaelEncrypt(const u32int rk[], int Nr, const uchar pt[16], uchar ct[16]); static void rijndaelDecrypt(const u32int rk[], int Nr, const uchar ct[16], uchar pt[16]);