Pristine Ack-5.5
[Ack-5.5.git] / modules / src / malloc / getsize.c
1 /* $Id: getsize.c,v 1.7 1994/06/24 11:17:43 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 /*      find out if a pointer-sized integer, preferably unsigned,
7         must be declared as an unsigned int or a long
8 */
9
10 #include <stdio.h>
11
12 main()
13 {
14         puts("#ifndef size_type");
15         if (sizeof(unsigned int) == sizeof(char *)) {
16                 puts("#define size_type unsigned int");
17         }
18         else if (sizeof(long) == sizeof(char *)) {
19                 puts("#define size_type long");
20         }
21         else {
22                 fputs("funny pointer size\n", stderr);
23                 exit(1);
24         }
25         puts("#endif");
26         exit(0);
27 }