Chameleon

Chameleon Commit Details

Date:2011-05-10 14:29:23 (3 years 7 months ago)
Author:Cosmosis Jones
Commit:770
Parents: 769
Message:Merged meklorts xcode4 bzero changes. nawcom tested on xcode3
Changes:
M/trunk/i386/cdboot/Makefile
M/trunk/i386/libsaio/md5c.c
M/trunk/i386/boot0/Makefile
M/trunk/i386/boot1/Makefile

File differences

trunk/i386/libsaio/md5c.c
2828
2929
3030
31
31
3232
33
34
35
36
37
38
3933
4034
4135
......
4337
4438
4539
46
47
48
49
50
51
5240
5341
54
5542
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
9743
9844
9945
* edited for clarity and style only.
*/
#include <sys/types.h>
#include "libsaio.h"
#ifdef KERNEL
#include <sys/systm.h>
#else
#include <string.h>
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
# include <Kernel/libkern/crypto/md5.h>
#else
#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,
trunk/i386/boot0/Makefile
22
33
44
5
5
6
67
78
89
910
1011
11
12
12
13
14
1315
1416
1517
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)/$@
trunk/i386/boot1/Makefile
55
66
77
8
8
9
910
1011
1112
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
trunk/i386/cdboot/Makefile
22
33
44
5
5
6
67
78
89
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)

Archive Download the corresponding diff file

Revision: 770