Replace MACHINE/CHIP macros with compiler macros
This commit is contained in:
@@ -904,7 +904,7 @@ static void data_to_user(sub_dev_t *sub_dev_ptr)
|
||||
|
||||
static int init_buffers(sub_dev_t *sub_dev_ptr)
|
||||
{
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
char *base;
|
||||
size_t size;
|
||||
unsigned left;
|
||||
@@ -954,10 +954,10 @@ static int init_buffers(sub_dev_t *sub_dev_ptr)
|
||||
sub_dev_ptr->DmaSize, sub_dev_ptr->Nr);
|
||||
return OK;
|
||||
|
||||
#else /* CHIP != INTEL */
|
||||
#else /* !defined(__i386__) */
|
||||
printf("%s: init_buffers() failed, CHIP != INTEL", drv.DriverName);
|
||||
return EIO;
|
||||
#endif /* CHIP == INTEL */
|
||||
#endif /* defined(__i386__) */
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||
}
|
||||
|
||||
if (ucp->uc_mcontext.mc_magic == MCF_MAGIC) {
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
/* The caller provides a pointer to a stack that we can use to run our
|
||||
context on. When the context starts, control is given to a wrapped
|
||||
start routine, which calls a function and cleans up the stack
|
||||
|
||||
@@ -57,10 +57,10 @@ int read_header_aout(
|
||||
|
||||
/* Check magic number, cpu type, and flags. */
|
||||
if (BADMAG(*hdr)) return(ENOEXEC);
|
||||
#if (CHIP == INTEL && _WORD_SIZE == 2)
|
||||
#if (defined(__i386__) && _WORD_SIZE == 2)
|
||||
if (hdr->a_cpu != A_I8086) return(ENOEXEC);
|
||||
#endif
|
||||
#if (CHIP == INTEL && _WORD_SIZE == 4)
|
||||
#if (defined(__i386__) && _WORD_SIZE == 4)
|
||||
if (hdr->a_cpu != A_I80386) return(ENOEXEC);
|
||||
#endif
|
||||
if ((hdr->a_flags & ~(A_NSYM | A_EXEC | A_SEP)) != 0) return(ENOEXEC);
|
||||
|
||||
@@ -409,7 +409,7 @@ void *arg;
|
||||
if (stackaddr == MAP_FAILED)
|
||||
mthread_panic("Failed to allocate stack to thread");
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
guard_start = stackaddr;
|
||||
guard_end = stackaddr + MTHREAD_GUARDSIZE;
|
||||
guarded_stacksize = stackaddr + stacksize - guard_end;
|
||||
|
||||
Reference in New Issue
Block a user