ack/modules/src/malloc/getsize.c
1987-01-06 11:25:09 +00:00

20 lines
388 B
C

/* find out if a pointer-sized integer, preferably unsigned,
must be declared as an unsigned int or a long
*/
#include <stdio.h>
main()
{
if (sizeof(unsigned int) == sizeof(char *)) {
puts("typedef unsigned int size_type;");
return 0;
}
if (sizeof(long) == sizeof(char *)) {
puts("typedef long size_type;");
return 0;
}
fputs(stderr, "funny pointer size\n");
return 1;
}