|
struct data32 {
int len;
caddr32_t addr;
};
struct data {
int len;
caddr_t addr;
};
xxmmap(dev_t dev, off_t off, int prot) {
struct data dtc; /* a local copy for clash resolution */
struct data *dp = (struct data *)shared_area;
switch (ddi_model_convert_from(ddi_mmap_get_model())) {
case DDI_MODEL_ILP32:
{
struct data32 *da32p;
da32p = (struct data32 *)shared_area;
dp = &dtc;
dp->len = da32p->len;
dp->address = da32->address;
break;
}
case DDI_MODEL_NONE:
break;
}
/* continues along using dp */
...
}
|