diff options
Diffstat (limited to 'Modules/CMakeCCompilerABI.c')
-rw-r--r-- | Modules/CMakeCCompilerABI.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerABI.c b/Modules/CMakeCCompilerABI.c new file mode 100644 index 0000000..e6a07f4 --- /dev/null +++ b/Modules/CMakeCCompilerABI.c @@ -0,0 +1,28 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#ifdef __CLASSIC_C__ +# define const +#endif + +/*--------------------------------------------------------------------------*/ + +#include "CMakeCompilerABI.h" + +/*--------------------------------------------------------------------------*/ + +#ifdef __CLASSIC_C__ +int main(argc, argv) int argc; char *argv[]; +#else +int main(int argc, char *argv[]) +#endif +{ + int require = 0; + require += info_sizeof_dptr[argc]; +#if defined(ABI_ID) + require += info_abi[argc]; +#endif + (void)argv; + return require; +} |