|
./compile surf.c
./load ezmlm-idx \
mime.a slurp.o slurpclose.o wait.a getln.a strerr.a sig.a open.a \
lock.a mime.a substdio.a stralloc.a alloc.a error.a str.a fd.a \
getopt.a case.a fs.a getconf.o makehash.o surf.o
ezmlm-idx.o(.text+0xeff): In function `main':
: undefined reference to `errno'
ezmlm-idx.o(.text+0xf83): In function `main':
: undefined reference to `errno'
slurp.o(.text+0x3b): In function `slurp':
: undefined reference to `errno'
slurpclose.o(.text+0x42): In function `slurpclose':
: undefined reference to `errno'
strerr.a(strerr_sys.o)(.text+0x8): In function `strerr_sysinit':
: undefined reference to `errno'
substdio.a(substdi.o)(.text+0x2c): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [ezmlm-idx] Error 1
I added
#include "errno.h"
which did not fix the problem.
[root@kappa ezmlm-0.53]# make
./compile surf.c
./load ezmlm-idx \
mime.a slurp.o slurpclose.o wait.a getln.a strerr.a sig.a open.a \
lock.a mime.a substdio.a stralloc.a alloc.a error.a str.a fd.a \
getopt.a case.a fs.a getconf.o makehash.o surf.o
ezmlm-idx.o(.text+0xeff): In function `main':
: undefined reference to `errno'
ezmlm-idx.o(.text+0xf83): In function `main':
: undefined reference to `errno'
slurp.o(.text+0x3b): In function `slurp':
: undefined reference to `errno'
slurpclose.o(.text+0x42): In function `slurpclose':
: undefined reference to `errno'
strerr.a(strerr_sys.o)(.text+0x8): In function `strerr_sysinit':
: undefined reference to `errno'
substdio.a(substdi.o)(.text+0x2c): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [ezmlm-idx] Error 1
here is surf.c
/* 19970320, overlap allowed 19970406 */
#include "surf.h"
#include "uint32.h"
#include "errno.h"
#define ROTATE(x,b) (((x) << (b)) | ((x) >> (32 - (b))))
#define MUSH(i,b) x = t[i] += (((x ^ seed[i]) + sum) ^ ROTATE(x,b));
void surf(out,in,seed)
uint32 out[8]; uint32 in[12]; uint32 seed[32];
{
uint32 t[12]; uint32 x; uint32 sum = 0;
int r; int i; int loop;
for (i = 0;i < 12;++i) t[i] = in[i] ^ seed[12 + i];
for (i = 0;i < 8;++i) out[i] = seed[24 + i];
x = t[11];
for (loop = 0;loop < 2;++loop) {
for (r = 0;r < 16;++r) {
sum += 0x9e3779b9;
MUSH(0,5) MUSH(1,7) MUSH(2,9) MUSH(3,13)
MUSH(4,5) MUSH(5,7) MUSH(6,9) MUSH(7,13)
MUSH(8,5) MUSH(9,7) MUSH(10,9) MUSH(11,13)
}
for (i = 0;i < 8;++i) out[i] ^= t[i + 4];
}
}
__________________
~Thomas |