1aa0567472
This also fixes the infamous "Bogus call to CARDS_RenderCard!" bug.
28 lines
972 B
Text
28 lines
972 B
Text
$NetBSD: patch-ab,v 1.1 2009/05/23 15:02:42 dholland Exp $
|
|
|
|
This patch fixes some stuff that breaks if you compile with assertions
|
|
and debugging on.
|
|
|
|
upstream: AFAIK upstream is currently comatose/dead
|
|
|
|
--- findtypes.c~ 1999-11-13 16:58:31.000000000 -0500
|
|
+++ findtypes.c 2007-11-02 14:49:44.000000000 -0400
|
|
@@ -77,12 +77,12 @@
|
|
fprintf(file, "/* Pointer type */\n");
|
|
|
|
/* Find the types */
|
|
- if (sizeof(void *) == sizeof (int))
|
|
- pointerType = "int";
|
|
- else if (sizeof(void *) == sizeof(long int))
|
|
- pointerType = "long int";
|
|
- else if (sizeof(void *) == sizeof(short int))
|
|
- pointerType = "short int";
|
|
+ if (sizeof(void *) == sizeof (unsigned))
|
|
+ pointerType = "unsigned";
|
|
+ else if (sizeof(void *) == sizeof(long unsigned))
|
|
+ pointerType = "long unsigned";
|
|
+ else if (sizeof(void *) == sizeof(short unsigned))
|
|
+ pointerType = "short unsigned";
|
|
else
|
|
{
|
|
printf("Cannot find integer the size of a pointer on this machine.\n");
|