pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/resize_image Fixed abuse of the C preprocessor.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/970f676504e7
branches:  trunk
changeset: 534009:970f676504e7
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Oct 10 22:47:46 2007 +0000

description:
Fixed abuse of the C preprocessor.

diffstat:

 graphics/resize_image/distinfo         |   3 +-
 graphics/resize_image/patches/patch-ad |  38 ++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletions(-)

diffs (56 lines):

diff -r a03ec52e1d6e -r 970f676504e7 graphics/resize_image/distinfo
--- a/graphics/resize_image/distinfo    Wed Oct 10 22:36:05 2007 +0000
+++ b/graphics/resize_image/distinfo    Wed Oct 10 22:47:46 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2005/02/24 08:45:13 agc Exp $
+$NetBSD: distinfo,v 1.3 2007/10/10 22:47:46 rillig Exp $
 
 SHA1 (resize_image-0.6.tar.gz) = e26f53db67de09bc641caf1ced4742a97be0c4a4
 RMD160 (resize_image-0.6.tar.gz) = 42d2ab8813835d51aa984546cb5f2c003e01f667
@@ -6,3 +6,4 @@
 SHA1 (patch-aa) = b72497572209b10eba9e4a2becbfb53661031092
 SHA1 (patch-ab) = 1ef571f47e79a018dfa73d5996265059edd746d1
 SHA1 (patch-ac) = 98b9d32e7d6ba96244a27288a9b36b3a7d41fbd1
+SHA1 (patch-ad) = a11e21c71ef4dda8d4ff5311dc57c857fe84f064
diff -r a03ec52e1d6e -r 970f676504e7 graphics/resize_image/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/resize_image/patches/patch-ad    Wed Oct 10 22:47:46 2007 +0000
@@ -0,0 +1,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



Home | Main Index | Thread Index | Old Index