Index: branches/meklort/i386/libsaio/md5c.c =================================================================== --- branches/meklort/i386/libsaio/md5c.c (revision 689) +++ branches/meklort/i386/libsaio/md5c.c (revision 690) @@ -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: branches/meklort/i386/boot0/Makefile =================================================================== --- branches/meklort/i386/boot0/Makefile (revision 689) +++ branches/meklort/i386/boot0/Makefile (revision 690) @@ -2,13 +2,14 @@ DIR = boot0 include ../MakePaths.dir -NASM = /Developer/usr/bin/nasm +NASM = $(shell which nasm) +#/Developer/usr/bin/nasm INSTALLDIR = $(DSTROOT)/usr/standalone/i386 DIRS_NEEDED = $(SYMROOT) all embedtheme optionrom: $(DIRS_NEEDED) boot0 boot0hfs chain0 -boot0: boot0.s Makefile $(NASM) +boot0: boot0.s @echo "\t[NASM] $@" @$(NASM) boot0.s -o $(SYMROOT)/$@ Index: branches/meklort/i386/boot1/Makefile =================================================================== --- branches/meklort/i386/boot1/Makefile (revision 689) +++ branches/meklort/i386/boot1/Makefile (revision 690) @@ -5,7 +5,8 @@ INSTALLDIR = $(DSTROOT)/usr/standalone/i386 DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -NASM = /Developer/usr/bin/nasm +NASM = $(shell which nasm) +#/Developer/usr/bin/nasm VERSIONED_FILES = boot1h Index: branches/meklort/i386/boot2/Makefile =================================================================== --- branches/meklort/i386/boot2/Makefile (revision 689) +++ branches/meklort/i386/boot2/Makefile (revision 690) @@ -19,10 +19,11 @@ SYMDIR = $(SYMROOT) LIBSADIR = ../libsa LIBSAIODIR = ../libsaio -KLIBCDIR = ../klibc +#KLIBCDIR = ../klibc UTILDIR = ../util -INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) -I$(KLIBCDIR) +INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) +#-I$(KLIBCDIR) ifneq "" "$(wildcard /bin/mkdirs)" MKDIRS = /bin/mkdirs else @@ -31,8 +32,10 @@ AS = as LD = gcc # LIBS= -lc_static -LIBS= -L$(SYMDIR) -lsaio -lsa -lklibc -LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a $(SYMDIR)/libklibc.a +LIBS= -L$(SYMDIR) -lsaio -lsa +#-lklibc +LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a +#$(SYMDIR)/libklibc.a OTHER_FILES = @@ -77,14 +80,14 @@ @echo "\t[LD] boot.sys" @$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \ -nostdlib -arch i386 -Wl,-segalign,20 \ - -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) + -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext @make Symbols.dylib @echo "\t[LD] boot_embeded.sys" @$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \ -nostdlib -arch i386 -Wl,-segalign,20 \ -Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \ - -o $(SYMROOT)/boot_embeded.sys $(filter %.o,$^) $(LIBS) + -o $(SYMROOT)/boot_embeded.sys $(filter %.o,$^) $(LIBS) -lcc_kext @ld -arch i386 \ -undefined dynamic_lookup \ @@ -92,13 +95,8 @@ -S -x -Z -dead_strip_dylibs \ -no_uuid \ -final_output Symbols.dylib \ - -L$(OBJROOT)/ \ - -L$(OBJROOT)/../ \ - -L$(OBJROOT)/../*/ \ - -L$(SYMROOT)/ \ $(filter %.o,$^) $(LIBS) \ - -weak_library $(SYMROOT)/boot.sys \ - -o $(SYMROOT)/Symbols_NOTE_linker_use_only.dylib + -o $(OBJROOT)/Symbols_LINKER_ONLY.dylib Index: branches/meklort/i386/modules/MakeInc.dir =================================================================== --- branches/meklort/i386/modules/MakeInc.dir (revision 689) +++ branches/meklort/i386/modules/MakeInc.dir (revision 690) @@ -35,9 +35,9 @@ -final_output $(MODULE_NAME) \ -L$(OBJROOT)/ \ -L$(OBJROOT)/../ \ - -L$(OBJROOT)/../*/ \ - -L$(SYMROOT)/ \ + -L$(SYMROOT)/ \ $(OBJROOT)/*.o \ + -weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \ -weak_library $(SYMROOT)/*.dylib \ -o $(SYMROOT)/$(MODULE_NAME).dylib @@ -60,11 +60,10 @@ -final_output $(MODULE_NAME) \ -L$(OBJROOT)/ \ -L$(OBJROOT)/../ \ - -L$(OBJROOT)/../*/ \ -L$(SYMROOT)/ \ $(OBJROOT)/*.o \ - -o $(SYMROOT)/$(MODULE_NAME).dylib - + -weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \ + -o $(SYMROOT)/$(MODULE_NAME).dylib @cp -rf include/* ../module_includes/ &> /dev/null || true endif Index: branches/meklort/i386/modules/klibc/strxspn.c =================================================================== --- branches/meklort/i386/modules/klibc/strxspn.c (revision 689) +++ branches/meklort/i386/modules/klibc/strxspn.c (revision 690) @@ -2,12 +2,12 @@ * strpbrk */ -#include -#include -#include #include #include "strxspn.h" + + + size_t __strxspn(const char *s, const char *map, int parity) { char matchmap[UCHAR_MAX + 1]; Index: branches/meklort/i386/cdboot/Makefile =================================================================== --- branches/meklort/i386/cdboot/Makefile (revision 689) +++ branches/meklort/i386/cdboot/Makefile (revision 690) @@ -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) Index: branches/meklort/i386/libsa/string.c =================================================================== --- branches/meklort/i386/libsa/string.c (revision 689) +++ branches/meklort/i386/libsa/string.c (revision 690) @@ -56,6 +56,7 @@ memset(dst, 0, len); } + #else void * memcpy(void * dst, const void * src, size_t len) {