Index: trunk/i386/libsaio/md5c.c =================================================================== --- trunk/i386/libsaio/md5c.c (revision 769) +++ trunk/i386/libsaio/md5c.c (revision 770) @@ -28,14 +28,8 @@ * edited for clarity and style only. */ -#include +#include "libsaio.h" -#ifdef KERNEL -#include -#else -#include -#endif - #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 # include #else @@ -43,57 +37,9 @@ #endif -#ifdef KERNEL -#define memset(x,y,z) bzero(x,z); -#define memcpy(x,y,z) bcopy(y, x, z) -#endif - -#if defined(__i386__) || defined(__alpha__) #define Encode memcpy #define Decode memcpy -#else /* __i386__ */ -/* - * Encodes input (u_int32_t) into output (unsigned char). Assumes len is - * a multiple of 4. - */ - -/* XXX not prototyped, and not compatible with memcpy(). */ -static void -Encode (output, input, len) - unsigned char *output; - u_int32_t *input; - unsigned int len; -{ - unsigned int i, j; - - for (i = 0, j = 0; j < len; i++, j += 4) { - output[j] = (unsigned char)(input[i] & 0xff); - output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); - output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); - output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); - } -} - -/* - * Decodes input (unsigned char) into output (u_int32_t). Assumes len is - * a multiple of 4. - */ - -static void -Decode (output, input, len) - u_int32_t *output; - const unsigned char *input; - unsigned int len; -{ - unsigned int i, j; - - for (i = 0, j = 0; j < len; i++, j += 4) - output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) | - (((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24); -} -#endif /* i386 */ - static unsigned char PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Index: trunk/i386/boot0/Makefile =================================================================== --- trunk/i386/boot0/Makefile (revision 769) +++ trunk/i386/boot0/Makefile (revision 770) @@ -2,14 +2,16 @@ DIR = boot0 include ../MakePaths.dir -NASM = /Developer/usr/bin/nasm +#NASM = /Developer/usr/bin/nasm +NASM = $(shell which nasm) INSTALLDIR = $(DSTROOT)/usr/standalone/i386 DIRS_NEEDED = $(SYMROOT) all embedtheme: $(DIRS_NEEDED) boot0 boot0hfs chain0 -boot0: boot0.s Makefile $(NASM) - $(NASM) boot0.s -o $(SYMROOT)/$@ +boot0: boot0.s + @echo "\t[NASM] $@" + @$(NASM) boot0.s -o $(SYMROOT)/$@ boot0hfs: boot0.s Makefile $(NASM) $(NASM) boot0.s -DHFSFIRST -o $(SYMROOT)/$@ Index: trunk/i386/boot1/Makefile =================================================================== --- trunk/i386/boot1/Makefile (revision 769) +++ trunk/i386/boot1/Makefile (revision 770) @@ -5,7 +5,8 @@ INSTALLDIR = $(DSTROOT)/usr/standalone/i386 DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -NASM = /Developer/usr/bin/nasm +#NASM = /Developer/usr/bin/nasm +NASM = $(shell which nasm) VERSIONED_FILES = boot1h Index: trunk/i386/cdboot/Makefile =================================================================== --- trunk/i386/cdboot/Makefile (revision 769) +++ trunk/i386/cdboot/Makefile (revision 770) @@ -2,7 +2,8 @@ DIR = cdboot include ../MakePaths.dir -NASM = /Developer/usr/bin/nasm +NASM = $(shell which nasm) +#/Developer/usr/bin/nasm INSTALLDIR = $(DSTROOT)/usr/standalone/i386 DIRS_NEEDED = $(SYMROOT)