Fixes suggested by Joren for a cleaner g++ compile.

This commit is contained in:
Ben Gras 2006-05-03 21:13:45 +00:00
parent d9d8b94602
commit fb6062185d
11 changed files with 16 additions and 16 deletions

View File

@ -307,7 +307,7 @@ PRIVATE void m_init()
if (OK != (s=sys_getmachine(&machine))) { if (OK != (s=sys_getmachine(&machine))) {
panic("MEM","Couldn't get machine information.",s); panic("MEM","Couldn't get machine information.",s);
} }
if (! machine.protected) { if (! machine.prot) {
m_geom[MEM_DEV].dv_size = cvul64(0x100000); /* 1M for 8086 systems */ m_geom[MEM_DEV].dv_size = cvul64(0x100000); /* 1M for 8086 systems */
} else { } else {
#if _WORD_SIZE == 2 #if _WORD_SIZE == 2

View File

@ -25,8 +25,8 @@
#else #else
/* Debugging enabled -- verify assertions at run time. */ /* Debugging enabled -- verify assertions at run time. */
#ifdef _ANSI #ifdef _ANSI
#define __str(x) # x #define __makestr(x) # x
#define __xstr(x) __str(x) #define __xstr(x) __makestr(x)
_PROTOTYPE( void __bad_assertion, (const char *_mess) ); _PROTOTYPE( void __bad_assertion, (const char *_mess) );
#define assert(expr) ((expr)? (void)0 : \ #define assert(expr) ((expr)? (void)0 : \

View File

@ -130,7 +130,7 @@ struct machine {
int pc_at; int pc_at;
int ps_mca; int ps_mca;
int processor; int processor;
int protected; int prot;
int vdu_ega; int vdu_ega;
int vdu_vga; int vdu_vga;
}; };

View File

@ -75,7 +75,7 @@ _PROTOTYPE( int getloadavg, (double *, int) );
#endif #endif
#ifdef _MINIX #ifdef _MINIX
_PROTOTYPE( int putenv, (const char *_name) ); _PROTOTYPE( int putenv, (char *_name) );
_PROTOTYPE( int setenv, (const char *name, const char *val, const int f)); _PROTOTYPE( int setenv, (const char *name, const char *val, const int f));
/* According to POSIX, getopt should be in unistd.h. What do we do with /* According to POSIX, getopt should be in unistd.h. What do we do with

View File

@ -49,7 +49,7 @@ int mine;
intr_disable(); intr_disable();
if (machine.protected) { if (machine.prot) {
/* The AT and newer PS/2 have two interrupt controllers, one master, /* The AT and newer PS/2 have two interrupt controllers, one master,
* one slaved at IRQ 2. (We don't have to deal with the PC that * one slaved at IRQ 2. (We don't have to deal with the PC that
* has just one controller, because it must run in real mode.) * has just one controller, because it must run in real mode.)

View File

@ -178,7 +178,7 @@ PRIVATE void announce(void)
#if (CHIP == INTEL) #if (CHIP == INTEL)
/* Real mode, or 16/32-bit protected mode? */ /* Real mode, or 16/32-bit protected mode? */
kprintf("Executing in %s mode.\n\n", kprintf("Executing in %s mode.\n\n",
machine.protected ? "32-bit protected" : "real"); machine.prot ? "32-bit protected" : "real");
#endif #endif
} }

View File

@ -263,7 +263,7 @@ U16_t seg;
phys_bytes base; phys_bytes base;
struct segdesc_s *segdp; struct segdesc_s *segdp;
if (! machine.protected) { if (! machine.prot) {
base = hclick_to_physb(seg); base = hclick_to_physb(seg);
} else { } else {
segdp = &gdt[seg >> 3]; segdp = &gdt[seg >> 3];
@ -286,7 +286,7 @@ phys_bytes phys;
* address, for use by a driver doing memory I/O in the A0000 - DFFFF range. * address, for use by a driver doing memory I/O in the A0000 - DFFFF range.
*/ */
#if _WORD_SIZE == 2 #if _WORD_SIZE == 2
if (! machine.protected) { if (! machine.prot) {
*seg = phys / HCLICK_SIZE; *seg = phys / HCLICK_SIZE;
*off = phys % HCLICK_SIZE; *off = phys % HCLICK_SIZE;
} else { } else {
@ -350,7 +350,7 @@ register struct proc *rp;
phys_bytes data_bytes; phys_bytes data_bytes;
int privilege; int privilege;
if (machine.protected) { if (machine.prot) {
data_bytes = (phys_bytes) (rp->p_memmap[S].mem_vir + data_bytes = (phys_bytes) (rp->p_memmap[S].mem_vir +
rp->p_memmap[S].mem_len) << CLICK_SHIFT; rp->p_memmap[S].mem_len) << CLICK_SHIFT;
if (rp->p_memmap[T].mem_len == 0) if (rp->p_memmap[T].mem_len == 0)

View File

@ -37,7 +37,7 @@ U16_t parmoff, parmsize; /* boot parameters offset and length */
* done below. * done below.
*/ */
#if _WORD_SIZE != 2 #if _WORD_SIZE != 2
machine.protected = 1; machine.prot = 1;
#endif #endif
/* Record where the kernel and the monitor are. */ /* Record where the kernel and the monitor are. */
@ -75,9 +75,9 @@ U16_t parmoff, parmsize; /* boot parameters offset and length */
*/ */
machine.processor=atoi(get_value(params, "processor")); machine.processor=atoi(get_value(params, "processor"));
#if _WORD_SIZE == 2 #if _WORD_SIZE == 2
machine.protected = machine.processor >= 286; machine.prot = machine.processor >= 286;
#endif #endif
if (! machine.protected) mon_return = 0; if (! machine.prot) mon_return = 0;
/* XT, AT or MCA bus? */ /* XT, AT or MCA bus? */
value = get_value(params, "bus"); value = get_value(params, "bus");

View File

@ -44,7 +44,7 @@ register message *m_ptr; /* pointer to request message */
} }
if (index < 0) return(ENOSPC); if (index < 0) return(ENOSPC);
if (! machine.protected) { if (! machine.prot) {
selector = phys / HCLICK_SIZE; selector = phys / HCLICK_SIZE;
offset = phys % HCLICK_SIZE; offset = phys % HCLICK_SIZE;
result = OK; result = OK;

View File

@ -14,7 +14,7 @@ extern _CONST char ***_penviron;
int int
putenv(name) putenv(name)
_CONST char *name; char *name;
{ {
register _CONST char **v = *_penviron; register _CONST char **v = *_penviron;
register char *r; register char *r;

View File

@ -292,7 +292,7 @@ PUBLIC void kenv_dmp()
printf("- pc_at: %3d\n", machine.pc_at); printf("- pc_at: %3d\n", machine.pc_at);
printf("- ps_mca: %3d\n", machine.ps_mca); printf("- ps_mca: %3d\n", machine.ps_mca);
printf("- processor: %3d\n", machine.processor); printf("- processor: %3d\n", machine.processor);
printf("- protected: %3d\n", machine.protected); printf("- protected: %3d\n", machine.prot);
printf("- vdu_ega: %3d\n", machine.vdu_ega); printf("- vdu_ega: %3d\n", machine.vdu_ega);
printf("- vdu_vga: %3d\n\n", machine.vdu_vga); printf("- vdu_vga: %3d\n\n", machine.vdu_vga);
printf("Kernel info structure:\n"); printf("Kernel info structure:\n");