endif(GMP_FOUND)
-check_type_size("long long" LONGLONG)
-if (HAVE_LONGLONG)
- set(SIZEOF_LONGLONG ${LONGLONG})
-endif()
check_type_size("short" SIZEOF_SHORT)
check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)
+check_type_size("long long" SIZEOF_LONGLONG)
check_type_size("void *" SIZEOF_VOIDP)
check_type_align("void *" ALIGNOF_VOIDP)
set(cl_short_bitsize ${x} CACHE INTERNAL "short_bitsize")
math(EXPR cl_int_bitsize "${SIZEOF_INT} * ${cl_char_bitsize}")
math(EXPR cl_long_bitsize "${SIZEOF_LONG} * ${cl_char_bitsize}")
+math(EXPR cl_long_long_bitsize "${SIZEOF_LONGLONG} * ${cl_char_bitsize}")
math(EXPR cl_pointer_bitsize "${SIZEOF_VOIDP} * ${cl_char_bitsize}")
-if (HAVE_LONGLONG)
- math(EXPR cl_long_long_bitsize "${SIZEOF_LONGLONG} * ${cl_char_bitsize}")
-endif()
check_include_file("unistd.h" HAVE_UNISTD_H)
else \
{ printf("#error \"Endianness makes no sense for type %s !!\"\n",typestr); } \
}
- get_endian(uchar,"unsigned char",uchar_bitsize);
get_endian(ushort,"unsigned short",ushort_bitsize);
get_endian(uint,"unsigned int",uint_bitsize);
get_endian(ulong,"unsigned long",ulong_bitsize);
printf("\n");
}
-long get_stack_direction(void)
- { char dummy;
- static char* dummyaddr = (char*)0;
- if (!(dummyaddr == (char*)0))
- { return (&dummy) - dummyaddr; }
- else
- { dummyaddr = &dummy;
- { long result = get_stack_direction();
- /* The next assignment avoids tail recursion elimination (IRIX 6.4 CC). */
- dummyaddr = (char*)0;
- return result;
- } }
- }
-
-void main10(void)
- { long stack_direction = get_stack_direction();
- if (stack_direction > 0)
- { printf("/* Stack grows up, ca. %ld bytes per function call. */\n",(long)stack_direction);
- printf("#define stack_grows_up\n");
- }
- else if (stack_direction < 0)
- { printf("/* Stack grows down, ca. %ld bytes per function call. */\n",-(long)stack_direction);
- printf("#define stack_grows_down\n");
- }
- else
- printf("#error \"Unknown stack model -- incorrect C semantics!!\"\n");
- }
-
int main(int argc, char *argv[])
{ if (freopen(argc==1 ? "conftest.h" : argv[1], "w", stdout) == NULL) return 1;
main1();
main7();
main8();
main9();
- main10();
if (ferror(stdout) || fclose(stdout)) return 1;
return 0;
}
#define short_bitsize @cl_short_bitsize@
#define int_bitsize @cl_int_bitsize@
#define long_bitsize @cl_long_bitsize@
-// #ifdef HAVE_LONGLONG
#define long_long_bitsize @cl_long_long_bitsize@
-// #endif
#define pointer_bitsize @cl_pointer_bitsize@
-#define stack_grows_down
#cmakedefine short_little_endian
#cmakedefine int_little_endian
#cmakedefine long_little_endian
echo "#error \"Type long long is stored in memory in an obscure manner!!\""
;;
esac
- echo
- case $host_cpu in
- hppa)
- echo "/* Stack grows up. */"
- echo "#define stack_grows_up"
- ;;
- *)
- echo "/* Stack grows down. */"
- echo "#define stack_grows_down"
- ;;
- esac
} > "$cl_machine_file_h"
])