Make things build on FreeBSD again.
This commit is contained in:
parent
1c253ceb58
commit
478ee9636f
8 changed files with 16 additions and 22 deletions
|
|
@ -4,9 +4,9 @@
|
||||||
#include "diff.h"
|
#include "diff.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
itemcmp(void *v1, void *v2)
|
itemcmp(const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
char **d1 = v1, **d2 = v2;
|
char *const*d1 = v1, *const*d2 = v2;
|
||||||
|
|
||||||
return strcmp(*d1, *d2);
|
return strcmp(*d1, *d2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
|
#include <u.h>
|
||||||
|
#define NOPLAN9DEFINES
|
||||||
|
#include <libc.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
#include <u.h>
|
|
||||||
#include <libc.h>
|
|
||||||
|
|
||||||
static char *nets[] = { "tcp", "udp", nil };
|
static char *nets[] = { "tcp", "udp", nil };
|
||||||
#define CLASS(p) ((*(uchar*)(p))>>6)
|
#define CLASS(p) ((*(uchar*)(p))>>6)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
#include <u.h>
|
||||||
|
#define NOPLAN9DEFINES
|
||||||
|
#include <libc.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#ifdef _HAVEDISKLABEL
|
#ifdef _HAVEDISKLABEL
|
||||||
#include <sys/disklabel.h>
|
#include <sys/disklabel.h>
|
||||||
|
|
@ -6,10 +11,6 @@
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
#include <u.h>
|
|
||||||
#define NOPLAN9DEFINES
|
|
||||||
#include <libc.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_p9dir(struct stat *st, char *name, Dir *d, char **str, char *estr)
|
_p9dir(struct stat *st, char *name, Dir *d, char **str, char *estr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -950,6 +950,7 @@ static int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* Expand the cipher key into the decryption key schedule.
|
* Expand the cipher key into the decryption key schedule.
|
||||||
*
|
*
|
||||||
|
|
@ -994,6 +995,7 @@ static int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int
|
||||||
}
|
}
|
||||||
return Nr;
|
return Nr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) {
|
static void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) {
|
||||||
u32 s0, s1, s2, s3, t0, t1, t2, t3;
|
u32 s0, s1, s2, s3, t0, t1, t2, t3;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void encode(uchar*, u32int*, ulong);
|
static void encode(uchar*, u32int*, ulong);
|
||||||
static void decode(u32int*, uchar*, ulong);
|
|
||||||
|
|
||||||
extern void _md5block(uchar*, ulong, u32int*);
|
extern void _md5block(uchar*, ulong, u32int*);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,7 @@ __threadgetproc(int rm)
|
||||||
{
|
{
|
||||||
Proc **l, *p;
|
Proc **l, *p;
|
||||||
int h, pid;
|
int h, pid;
|
||||||
Thread *t;
|
|
||||||
ulong *s;
|
|
||||||
|
|
||||||
/* fails on linux, probably because the main stack
|
|
||||||
* has to be grown a page at a time instead of the big jump?
|
|
||||||
s = (ulong*)((ulong)&pid & ~(STKSIZE-1));
|
|
||||||
if(s[0] == STKMAGIC){
|
|
||||||
t = (Thread*)s[1];
|
|
||||||
return t->proc;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
pid = _threadgetpid();
|
pid = _threadgetpid();
|
||||||
|
|
||||||
lock(&ptablock);
|
lock(&ptablock);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ DIRS=\
|
||||||
libthread\
|
libthread\
|
||||||
libutf\
|
libutf\
|
||||||
libventi\
|
libventi\
|
||||||
# cmd\
|
cmd\
|
||||||
|
|
||||||
<mkdirs
|
<mkdirs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ O=o
|
||||||
BIN=$PLAN9/bin
|
BIN=$PLAN9/bin
|
||||||
LIBDIR=$PLAN9/lib
|
LIBDIR=$PLAN9/lib
|
||||||
|
|
||||||
<$PLAN9/src/mk.$SYSNAME-$OBJTYPE
|
<|cat $PLAN9/src/mk.$SYSNAME-$OBJTYPE 2>/dev/null || true
|
||||||
|
|
||||||
OS=$O
|
OS=$O
|
||||||
LD=9l
|
LD=9l
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue