Re: [PATCH] Ansi-C compatibility fixes

Bojan Popovic <[email protected]>
Newsgroups org.kernel.vger.linux-8086
Message-ID <[email protected]>
Hi, 

I tried building the current git snapshot. It builds fine (tested on
Slackware 14.0rc2) and the image runs nicely in Qemu 1.1.1.

But there is a small problem in elks/arch/i86/Makefile. Newline (\n)
is not parsed by echo and it gets in asm-offsets.h (ie: \n#endif instead
of #endif). 

--- Makefile.orig	2012-08-20 20:54:06.000000000 +0200
+++ Makefile	2012-08-20 21:06:07.197644614 +0200
@@ -88,7 +88,7 @@
 $(BASEDIR)/include/arch/asm-offsets.h: kernel/asm-offsets.c
 	$(CC) $(CFLAGS) -S -o asm-offsets.s kernel/asm-offsets.c
 	echo '#ifndef ASM_OFFSETS_H' >
$(BASEDIR)/include/arch/asm-offsets.h
-	echo '#define ASM_OFFSETS_H\n' >>
$(BASEDIR)/include/arch/asm-offsets.h
+	echo -e '#define ASM_OFFSETS_H\n' >>
$(BASEDIR)/include/arch/asm-offsets.h sed -e '/^[^m].*/ d' \
 	-e 's/\],/  /' \
 	-e 's/ #/ /' \
@@ -97,7 +97,7 @@
 	-e 's/^.*\[_/#define /' \
 	-e 's/ax/0/' \
 	< asm-offsets.s | grep -e define >>
$(BASEDIR)/include/arch/asm-offsets.h
-	echo '\n#endif' >> $(BASEDIR)/include/arch/asm-offsets.h
+	echo -e '\n#endif' >> $(BASEDIR)/include/arch/asm-offsets.h
 	rm asm-offsets.s
 
 #########################################################################

Bojan.

On Sat, 11 Aug 2012 11:22:20 -0400
Jody Bruchon <[email protected]> wrote:

> Juan and everyone else, I just wanted to let you all know that the 
> patches submitted to this point have been pushed to the Git
> repository on SourceForge. Thank you Juan! You've done some pretty
> amazing work on the ELKS project. I'm definitely impressed at what
> you've managed to do.
> 
> I'm thinking of dropping another "release" of 0.1.5 after some more 
> testing. It couldn't hurt to get these serious bug fixes out there as
> a version bump.
> 
> Jody Bruchon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.