Closest portable method I believe you can use to determine the type of system is to do a sizeof(void *). If you want it in bits, multiply by 8 obviously. This depends upon the compiler, though, more than the system on which you're compiling.