#define PC_OFF ((long)&((struct proc *)0)->p_reg.pc)
#endif
-#define ADDRSIZE _WORD_SIZE
+#define ADDRSIZE (sizeof(void *))
#define BITSIZE(size) (8 * (size))
#define INTSIZE (sizeof(int)) /* not quite right for cross-debugger */
#define LONGSIZE (sizeof(long))
else if (mod == MEM2_MOD)
{
outbyte('+');
-#if (_WORD_SIZE == 4)
out32offset();
-#else
- outgetaddr();
-#endif
}
outbyte(RINDIRECT);
if (hasize == 16 && rm == 4 && index == 4 && ss != 0)
outbyte(')');
}
-#if (_WORD_SIZE == 4)
-
static void out32offset()
{
off_t off;
outh32(off);
}
-#endif
static void outfishy()
{
int count;
int symflg;
{
-#if (_WORD_SIZE == 4)
bits32 = TRUE; /* Set mode */
-#else
- bits32 = FALSE;
-#endif
uptr.off = addr;
uptr.base = 0; /* not known */
while ( count-- != 0 && show1instruction() )
/* Check CPU */
#if defined(__i386__)
-#if (_WORD_SIZE == 4)
if (hdr->a_cpu != A_I80386)
-#else
- if (hdr->a_cpu != A_I8086)
#endif
-#endif
{
Printf("mdb: invalid cpu in exec header - %04x\n",
hdr->a_cpu);
schar += 'A' - 'a';
outbyte( schar );
outspace();
-#if (_WORD_SIZE == 2)
- outh16( (u16_t) sp->n_value );
-#else
outh32( sp->n_value );
-#endif
outbyte('\n');
}
}
for ( ; s <= send; ++s ) outspace();
outbyte( schar );
outspace();
-#if (_WORD_SIZE == 2)
- outh16( (u16_t) sp->n_value );
-#else
outh32( sp->n_value );
-#endif
outbyte('\n');
}
}
*/
sys_setalarm(wakeup_ticks, 0);
-#if _WORD_SIZE > 2
if (cnt > 0xFFFE) cnt = 0xFFFE; /* Max data per interrupt. */
-#endif
w_command = ATAPI_PACKETCMD;
pv_set(outbyte[0], wn->base_cmd + REG_FEAT, do_dma ? FEAT_DMA : 0);
/* Miscellaneous. */
#define MAX_DRIVES 8
#define COMPAT_DRIVES 4
-#if _WORD_SIZE > 2
#define MAX_SECS 256 /* controller can transfer this many sectors */
-#else
-#define MAX_SECS 127 /* but not to a 16 bit process */
-#endif
#define MAX_ERRORS 4 /* how often to try rd/wt before quitting */
#define NR_MINORS (MAX_DRIVES * DEV_PER_DRIVE)
#define SUB_PER_DRIVE (NR_PARTITIONS * NR_PARTITIONS)
#define _BSD_CLOCK_T_ long
-#if _EM_PSIZE == _EM_WSIZE
#define _BSD_PTRDIFF_T_ int
-#else /* _EM_PSIZE == _EM_LSIZE */
-#define _BSD_PTRDIFF_T_ long
-#endif
#define _BSD_SIZE_T_ unsigned int
#define _BSD_SSIZE_T_ int
union fpu_state_u sc_fpu_state;
};
-#if _WORD_SIZE == 4
#define sc_gs sc_regs.gs
#define sc_fs sc_regs.fs
-#endif /* _WORD_SIZE == 4 */
#define sc_es sc_regs.es
#define sc_ds sc_regs.ds
#define sc_di sc_regs.di
#include <minix/types.h>
#endif
-#if _EM_WSIZE >= 4
/* Ioctls have the command encoded in the low-order word, and the size
* of the parameter in the high-order word. The 3 high bits of the high-
* order word are used to encode the in/out/void status of the parameter.
#define _MINIX_IOCTL_BIG(i) ((i) & _IOC_BIG)
#define _MINIX_IOCTL_SIZE_BIG(i) (((i) >> 8) & _IOCPARM_MASK_BIG)
-#else
-/* No fancy encoding on a 16-bit machine. */
-
-#define _IO(x,y) ((x << 8) | y)
-#define _IOR(x,y,t) _IO(x,y)
-#define _IOW(x,y,t) _IO(x,y)
-#define _IORW(x,y,t) _IO(x,y)
-#endif
-
__BEGIN_DECLS
int ioctl(int _fd, int _request, void *_data);
__END_DECLS
/*===========================================================================*
* This section contains user-settable parameters *
*===========================================================================*/
-/* Word size in bytes (a constant equal to sizeof(int)). */
-#if __ACK__ || __GNUC__
-#define _WORD_SIZE _EM_WSIZE
-#define _PTR_SIZE _EM_WSIZE
-#endif
#define _NR_PROCS 256
#define _NR_SYS_PROCS 64
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
-#if _EM_WSIZE > 2
#define ARG_MAX 262144 /* # bytes of args + environ for exec() */
-#else
-#define ARG_MAX 4096 /* args + environ on small machines */
-#endif
#ifndef CHILD_MAX
#define CHILD_MAX _NO_LIMIT /* max simultaneous processes */
sc.sc_ds = rp->p_reg.ds;
sc.sc_es = rp->p_reg.es;
sc.sc_ss = rp->p_reg.ss;
-#if _WORD_SIZE == 4
sc.sc_fs = rp->p_reg.fs;
sc.sc_gs = rp->p_reg.gs;
-#endif
#endif
/* Restore the registers. */
if (i == (int) &((struct proc *) 0)->p_reg.cs ||
i == (int) &((struct proc *) 0)->p_reg.ds ||
i == (int) &((struct proc *) 0)->p_reg.es ||
-#if _WORD_SIZE == 4
i == (int) &((struct proc *) 0)->p_reg.gs ||
i == (int) &((struct proc *) 0)->p_reg.fs ||
-#endif
i == (int) &((struct proc *) 0)->p_reg.ss)
return(EFAULT);
#endif
if (no_debug == 0) { statement; } \
}
-#if _EM_WSIZE == _EM_PSIZE
#define ptrint int
-#else
-#define ptrint long
-#endif
-#if _EM_PSIZE == 2
-#define BRKSIZE 1024
-#else
#define BRKSIZE 4096
-#endif
#ifdef ALIGN_EIGHT_BYTES
#define PTRSIZE 8
#else
* the bytes in the pointer are the same, just in case.
*/
-#if _EM_PSIZE==2
-char **environ = (char **) 0x5353;
-#else
char **environ = (char **) 0x53535353;
-#endif
/* Check magic number, cpu type, and flags. */
if (BADMAG(*hdr)) return(ENOEXEC);
-#if (defined(__i386__) && _WORD_SIZE == 2)
- if (hdr->a_cpu != A_I8086) return(ENOEXEC);
-#endif
-#if (defined(__i386__) && _WORD_SIZE == 4)
+#if defined(__i386__)
if (hdr->a_cpu != A_I80386) return(ENOEXEC);
#endif
if ((hdr->a_flags & ~(A_NSYM | A_EXEC | A_SEP)) != 0) return(ENOEXEC);
#define CHECK_DBG(statement)
-#if _EM_WSIZE == _EM_PSIZE
#define ptrint int
-#else
-#define ptrint long
-#endif
-#if _EM_PSIZE == 2
-#define BRKSIZE 1024
-#else
#define BRKSIZE 4096
-#endif
#ifdef ALIGN_EIGHT_BYTES
#define PTRSIZE 8
#else