Fixed to build for GCC 3.1

This commit is contained in:
Yoshihiro Takahashi 2002-05-14 12:34:03 +00:00
parent 629d0dd5e0
commit 8b20c954cb
6 changed files with 16 additions and 17 deletions

View File

@ -8,9 +8,7 @@ SRCS+= probe_keyboard.c io.c disk.c sys.c
BINDIR= /boot
BINMODE= 444
CFLAGS= -elf -Os -ffreestanding -fforce-addr -fdata-sections \
-malign-functions=0 -malign-jumps=0 -malign-loops=0 \
-mpreferred-stack-boundary=2 -mrtd \
CFLAGS= -elf -Os -fno-guess-branch-probability -mrtd \
-D_KERNEL -DPC98 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
CFLAGS+= ${CWARNFLAGS}

View File

@ -63,7 +63,7 @@
#define INL inl (%dx)
#define OUTL outl (%dx)
#else wheeze
#else /* wheeze */
#define ALIGN
#define LCL(x) x
@ -74,12 +74,12 @@
#define LBb(x,n) n ## b
#define LBf(x,n) n ## f
#else __STDC__
#else /* __STDC__ */
#define EXT(x) _/**/x
#define LEXT(x) _/**/x/**/:
#define LBb(x,n) n/**/b
#define LBf(x,n) n/**/f
#endif __STDC__
#endif /* __STDC__ */
#define SVC .byte 0x9a; .long 0; .word 0x7
#define String .ascii
@ -92,7 +92,7 @@
#define INL inl %dx, %eax
#define OUTL outl %eax, %dx
#endif wheeze
#endif /* wheeze */
#define addr32 .byte 0x67
#define data32 .byte 0x66
@ -109,7 +109,7 @@
#define ASENTRY(x) .globl x; .align ALIGN; x ## : ; \
pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
#else __STDC__
#else /* __STDC__ */
#define MCOUNT .data; LB(x, 9): .long 0; .text; lea LBb(x, 9),%edx; call mcount
#define ENTRY(x) .globl EXT(x); .align ALIGN; LEXT(x) ; \
@ -119,8 +119,8 @@
#define ASENTRY(x) .globl x; .align ALIGN; x: ; \
pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
#endif __STDC__
#else GPROF
#endif /* __STDC__ */
#else /* GPROF */
#ifdef __STDC__
#define MCOUNT
@ -129,7 +129,7 @@
.align ALIGN; LEXT(x) LEXT(y)
#define ASENTRY(x) .globl x; .align ALIGN; x ## :
#else __STDC__
#else /* __STDC__ */
#define MCOUNT
#define ENTRY(x) .globl EXT(x); .align ALIGN; LEXT(x)
@ -137,8 +137,8 @@
.align ALIGN; LEXT(x) LEXT(y)
#define ASENTRY(x) .globl x; .align ALIGN; x:
#endif __STDC__
#endif GPROF
#endif /* __STDC__ */
#endif /* GPROF */
#define Entry(x) .globl EXT(x); .align ALIGN; LEXT(x)
#define DATA(x) .globl EXT(x); .align ALIGN; LEXT(x)

View File

@ -28,6 +28,7 @@
*/
#include <sys/param.h>
#include <sys/disklabel.h>
#include <sys/time.h>
#include <ufs/ffs/fs.h>

View File

@ -95,7 +95,7 @@ devopen(void)
{
#ifdef EMBEDDED_DISKLABEL
dl = &disklabel;
#else EMBEDDED_DISKLABEL
#else /* EMBEDDED_DISKLABEL */
#ifdef PC98
p = Bread(dosdev_copy, 1);
dptr = (struct dos_partition *)p;
@ -123,7 +123,7 @@ devopen(void)
dl=((struct disklabel *)p);
disklabel = *dl; /* structure copy (maybe useful later)*/
#endif /* PC98 */
#endif EMBEDDED_DISKLABEL
#endif /* EMBEDDED_DISKLABEL */
if (dl->d_magic != DISKMAGIC) {
printf("bad disklabel\n");
return 1;

View File

@ -289,7 +289,7 @@ strcasecmp(const char *s1, const char *s2)
void
bcopy(const void *from, void *to, size_t len)
{
char *fp = (char *)from;
const char *fp = (const char *)from;
char *tp = (char *)to;
while (len-- > 0)

View File

@ -450,7 +450,7 @@ one: String "1-\0"
two: String "2-\0"
three: String "3-\0"
four: String "4-\0"
#endif DEBUG
#endif /* DEBUG */
#ifdef NAMEBLOCK_WRITEBACK
ewrite: String "Write error\r\n\0"
#endif /* NAMEBLOCK_WRITEBACK */