pkgsrc/net/vnc/patches/patch-aj
tron 4667bb6be4 Use a more elegant method to solve the problem with the confliction
definition of the abs() macro. Based on a suggestion by Roland Illig.
2005-02-17 23:16:44 +00:00

24 lines
650 B
Text

$NetBSD: patch-aj,v 1.2 2005/02/17 23:16:44 tron Exp $
--- Xvnc/programs/Xserver/include/misc.h.orig 1996-12-23 07:09:29.000000000 +0000
+++ Xvnc/programs/Xserver/include/misc.h 2005-02-17 23:05:46.000000000 +0000
@@ -83,6 +83,10 @@
#include <X11/Xmd.h>
#include <X11/X.h>
+#ifdef __NetBSD__
+#include <stdlib.h>
+#endif
+
#ifndef NULL
#ifndef X_NOT_STDC_ENV
#include <stddef.h>
@@ -159,7 +166,7 @@
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
#if !defined(AMOEBA) && !defined(__EMX__)
-#ifndef abs
+#if !defined(abs)
#define abs(a) ((a) > 0 ? (a) : -(a))
#endif
#else /* AMOEBA || __EMX__ */