Messages in this thread | | | From | Bodo Eggert <> | Subject | Re: how to detect a 32 bit process on 64 bit kernel | Date | Thu, 16 Dec 2004 14:00:16 +0100 |
| |
Michael S. Tsirkin wrote: > Quoting r. Brian Gerst (bgerst@didntduck.org) "Re: how to detect a 32 bit
>> The most portable way to do this is to have the first member of the >> structure be a 32-bit value containing the size of the structure.
Better: Use version numbers.
> The size wont be sufficient here since its variable size > (ends with an array).
Use the size without the array, check the array size seperately. Or see above.
> Sure, I could also just ask everyone to pass pointers in a > packed long long, but either way it will break the applications.
If the size of structs you use in APIs is system dependant, it's most likely b0rken.
> Why wouldnt it make sence for struct task to have a bit that tells > me its a compat system?
Not having it will prevent you from creating strange interfaces.-) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |