summaryrefslogtreecommitdiff
path: root/graphics/resize_image/patches/patch-ad
blob: 7dc2a7d4cfc9ecb85f9387c17d741da7d7e3b553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$NetBSD: patch-ad,v 1.1 2007/10/10 22:47:46 rillig Exp $

Using macros for types belongs to the bad habits of C programmers.

--- utils/general.h.orig	2002-08-08 13:13:01.000000000 +0200
+++ utils/general.h	2007-10-11 00:45:50.000000000 +0200
@@ -9,9 +9,7 @@
 #ifndef __GENERAL_H__
 #define __GENERAL_H__
 
-#ifndef NULL
-#define NULL 0
-#endif
+#include <stddef.h>
 
 #ifndef FALSE
 #define FALSE 0
@@ -22,7 +20,8 @@
 #endif
 
 #ifndef uint
-#define uint unsigned int
+typedef unsigned int resizeimage_uint;
+#define uint resizeimage_uint
 #endif
 
 #ifndef int8
@@ -46,7 +45,9 @@
 #endif
 
 #ifndef boolean
-#define boolean int
+typedef int boolean;
+#define boolean boolean
+#define HAVE_BOOLEAN
 #endif
 
 #ifndef pointer