getabi(3C) getabi(3C) NAME getabi - get ABI from argument vector SYNOPSIS #include <getabi.h> abi_t getabi (int generic_size, int modify_abi_arg, char ***argv, int *argc); DESCRIPTION getabi is used to determine whether to use the 32-bit ABI (abi32) or the 64-bit ABI (abi64). First it checks the argv list for "-32" or "-64". If neither of these is given, then it checks the argv list for a "-mips[1- 4]" option. Mips 1 and 2 imply abi32 while mips 3 and 4 imply abi64. If none of the argv options specify the abi, then we check the SGI_ABI environment variable, which can be set to either "-32" or "-64". If SGI_ABI is not in the environment, then we check what kernel is installed. If we are running on a system that has the 64-bit kernel, then we default to abi64; else we default to abi32. The generic_size parameter says whether to return the ABI for the generic size (abi32 or abi64), or to return the specific ABI (abio32 or abi64). The modify_abi_arg parameter says whether to ignore the argv list when determining the ABI, or, if we do use the argv list, whether to preserve the argv list, or add the default abi value to the argv list, or remove the abi value from the argv list. This gives extra flexibility to users in how ABI options are handled in the argv list. This is also why the argv and argc options are passed by address, so their values can possibly be modified by getabi(). SEE ALSO DIAGNOSTICS getabi prints an error message on the standard error and returns noabi when it encounters an error. Page 1