[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] almost there..... Newbie trying to compile Mint v1.17...



On Fri, 2011-02-11 at 07:07 -0800, WongCK wrote:
> Thanks. I hope I am not taking too much of your time.
> Applied Block_IO.patch.
> next:
> 
> make buildkernel kernel=060
> make[1]: Entering directory `/e/dev/freemint-1_17_0/sys'
> Making all in arch
> make[2]: Entering directory `/e/dev/freemint-1_17_0/sys/arch'
> Making all in magic
> make[3]: Entering directory `/e/dev/freemint-1_17_0/sys/arch/magic'
> make[3]: Leaving directory `/e/dev/freemint-1_17_0/sys/arch/magic'
> cd .compile_060; make all
> make[3]: Entering directory `/e/dev/freemint-1_17_0/sys/arch/.compile_060'
> make[3]: Leaving directory `/e/dev/freemint-1_17_0/sys/arch/.compile_060'
> make[2]: Leaving directory `/e/dev/freemint-1_17_0/sys/arch'
> Making all in buildinfo
> make[2]: Entering directory `/e/dev/freemint-1_17_0/sys/buildinfo'
> make[2]: Leaving directory `/e/dev/freemint-1_17_0/sys/buildinfo'
> cd .compile_060; make all
> make[2]: Entering directory `/e/dev/freemint-1_17_0/sys/.compile_060'
> gcc -I.. -D__KERNEL__ -DLANG_ENGLISH -DVERBOSE_BOOT -DWITH_SINGLE_TASK_SUPPORT 
> -DCRYPTO_CODE -DSOFT_UNITABLE -DBUILTIN_SHELL -DM68060 -m68060 -Werror -mshort 
> -g -O2 -fomit-frame-pointer -Wall -Wmissing-prototypes -Winline -Wshadow 
> -Wpointer-arith -Wcast-qual -Werror -c ../cnf_mint.c -o cnf_mint.o
> ../cnf_mint.c: In function `pCB_exec':
> ../cnf_mint.c:411: parse error before `char'
> ../cnf_mint.c:414: `i' undeclared (first use in this function)
> ../cnf_mint.c:414: (Each undeclared identifier is reported only once
> ../cnf_mint.c:414: for each function it appears in.)
> ../cnf_mint.c:416: `cmdline' undeclared (first use in this function)
> make[2]: *** [cnf_mint.o] Error 1
> make[2]: Leaving directory `/e/dev/freemint-1_17_0/sys/.compile_060'
> make[1]: *** [_stmp_060] Error 2
> make[1]: Leaving directory `/e/dev/freemint-1_17_0/sys'
> make: *** [060] Error 2

O.k. try this one.

Alan.
Index: sys/cnf_mint.c
===================================================================
RCS file: /mint/freemint/sys/cnf_mint.c,v
retrieving revision 1.19
diff -u -r1.19 cnf_mint.c
--- sys/cnf_mint.c	13 Jan 2010 17:13:49 -0000	1.19
+++ sys/cnf_mint.c	11 Feb 2011 15:17:12 -0000
@@ -407,9 +407,11 @@
 static void
 pCB_exec(const char *path, const char *line, struct parsinf *inf)
 {
-	union { const char *cc; char *c;} pathptr; pathptr.cc = path;
 	char cmdline[128];
 	int i;
+	union { const char *cc; char *c;} pathptr; 
+	
+	pathptr.cc = path;
 
 	i = strlen(line);
 	if (i > 126) i = 126;
Index: sys/fatfs.c
===================================================================
RCS file: /mint/freemint/sys/fatfs.c,v
retrieving revision 1.50.2.1
diff -u -r1.50.2.1 fatfs.c
--- sys/fatfs.c	14 Jan 2011 17:03:32 -0000	1.50.2.1
+++ sys/fatfs.c	11 Feb 2011 15:17:13 -0000
@@ -7074,11 +7074,14 @@
 
 	if (r == E_OK)
 	{
-		register union { const char *cc; const unsigned char *c; } nameptr; nameptr.cc = name;
+		register union { const char *cc; const unsigned char *c; } nameptr; 
 		register const char *table = DEFAULT_T (dir->dev);
-		register const uchar *src = nameptr.c;
+		register const uchar *src;
 		register char *dst = odir.info->name;
 		register long i;
+		
+		nameptr.cc = name;
+		src = nameptr.c;
 
 		for (i = 0; i < 11 && *src; i++)
 		{
Index: sys/ipc_socketdev.c
===================================================================
RCS file: /mint/freemint/sys/ipc_socketdev.c,v
retrieving revision 1.18
diff -u -r1.18 ipc_socketdev.c
--- sys/ipc_socketdev.c	13 Jan 2010 17:13:49 -0000	1.18
+++ sys/ipc_socketdev.c	11 Feb 2011 15:17:13 -0000
@@ -117,9 +117,12 @@
 static long
 sock_write (FILEPTR *f, const char *buf, long buflen)
 {
-	union { const char *cc; char *c; } bufptr; bufptr.cc = buf;
+	union { const char *cc; char *c; } bufptr;
 	struct socket *so = (struct socket *) f->devinfo;
-	struct iovec iov[1] = {{ bufptr.c, buflen }};
+	struct iovec iov[1];
+
+	bufptr.cc = buf;
+	iov[1] = {{ bufptr.c, buflen }};
 
 	SOCKDEV_ASSERT ((so));
 
Index: sys/k_exec.c
===================================================================
RCS file: /mint/freemint/sys/k_exec.c,v
retrieving revision 1.45
diff -u -r1.45 k_exec.c
--- sys/k_exec.c	2 Jun 2010 20:24:58 -0000	1.45
+++ sys/k_exec.c	11 Feb 2011 15:17:13 -0000
@@ -323,9 +323,9 @@
 	else if (mkload)
 	{
 		char cbuf[128];
-		union { const char *cc; char *c; } tail; tail.cc = ptr_2.cc;
 		//const char *tail = ptr_2.cc;
 		long ret;
+		union { const char *cc; char *c; } tail; tail.cc = ptr_2.cc;
 
 		if (overlay)
 		{
Index: sys/ramfs.c
===================================================================
RCS file: /mint/freemint/sys/ramfs.c,v
retrieving revision 1.19
diff -u -r1.19 ramfs.c
--- sys/ramfs.c	11 Aug 2010 12:46:18 -0000	1.19
+++ sys/ramfs.c	11 Feb 2011 15:17:13 -0000
@@ -1448,10 +1448,12 @@
 static long _cdecl
 ram_opendir (DIR *dirh, int flags)
 {
-	union { char *c; DIRLST **d; } ptr; ptr.c = dirh->fsstuff;
+	union { char *c; DIRLST **d; } ptr;
 	COOKIE *c = (COOKIE *) dirh->fc.index;
 	DIRLST *l;
 
+	ptr.c = dirh->fsstuff;
+
 	if (!IS_DIR (c))
 	{
 		RAM_DEBUG (("ramfs: ram_opendir: dir not a DIR!"));
@@ -1472,10 +1474,12 @@
 static long _cdecl
 ram_readdir (DIR *dirh, char *nm, int nmlen, fcookie *fc)
 {
-	union { char *c; DIRLST **d;} ptr; ptr.c = dirh->fsstuff;
+	union { char *c; DIRLST **d;} ptr;
 	DIRLST *l;
 	long r = ENMFILES;
 
+	ptr.c = dirh->fsstuff;
+
 	l = *ptr.d; // *(DIRLST **) (&dirh->fsstuff);
 	if (l)
 	{
Index: sys/umemory.c
===================================================================
RCS file: /mint/freemint/sys/umemory.c,v
retrieving revision 1.8
diff -u -r1.8 umemory.c
--- sys/umemory.c	13 Jan 2010 17:13:49 -0000	1.8
+++ sys/umemory.c	11 Feb 2011 15:17:13 -0000
@@ -148,9 +148,11 @@
 static struct umem_descriptor *
 umem_split(struct umem_descriptor *descr, unsigned long n, unsigned long size)
 {
-	union { char *c; struct umem_descriptor *d; } ptr; ptr.d = descr;
+	union { char *c; struct umem_descriptor *d; } ptr;
 	struct umem_descriptor *descr1;
 
+	ptr.d = descr;
+
 	descr1 = (void *)(ptr.c + (n - size));
 
 	descr1->head_magic = UMEM_HEAD_MAGIC;
@@ -171,7 +173,10 @@
 umem_lookup(struct proc *p, MEMREGION *m, unsigned long size, void **result)
 {
 	struct umem_descriptor *descr;
-	union { char **c; void **v; } resultptr; resultptr.v = result;
+	union { char **c; void **v; } resultptr; 
+	
+	resultptr.v = result;
+
 	/* default is nothing found */
 	*resultptr.v = NULL;
 
@@ -306,10 +311,12 @@
 void _cdecl
 _ufree(void *plac, const char *func)
 {
-	union { char *c; void *v; long l; struct umem_descriptor *descr; } placeptr; placeptr.v = plac;
+	union { char *c; void *v; long l; struct umem_descriptor *descr; } placeptr; 
 	struct proc *p = get_curproc();
 	MEMREGION *m;
 
+	placeptr.v = plac;
+
 	DEBUG(("ufree(0x%lx, %s)", plac, func));
 
 	m = proc_addr2region(p, placeptr.l);
Index: sys/unifs.c
===================================================================
RCS file: /mint/freemint/sys/unifs.c,v
retrieving revision 1.26
diff -u -r1.26 unifs.c
--- sys/unifs.c	7 Apr 2010 21:38:38 -0000	1.26
+++ sys/unifs.c	11 Feb 2011 15:17:13 -0000
@@ -238,12 +238,14 @@
 static long
 do_ulookup (fcookie *dir, const char *nam, fcookie *fc, UNIFILE **up)
 {
-	union { const char *cc; char *c; } nameptr; nameptr.cc = nam;
+	union { const char *cc; char *c; } nameptr;
 	UNIFILE *u;
 	long drvs;
 	FILESYS *fs;
 	fcookie *tmp;
 	long changed;
+	
+	nameptr.cc = nam;
 
 	TRACE (("uni_lookup(%s)", nam));