diff options
author | Peter Åstrand <astrand@cendio.se> | 2005-01-13 22:11:30 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2005-01-13 22:11:30 +0000 |
commit | 0f49e22bdc0f9b8cfbaa420f114c5313c7ea68bd (patch) | |
tree | a02cb86e7ca980b3ce20fc930e0f0a55a00984d1 /Xregion | |
parent | f3c26fbdd3c904657c764afaf56688864c214131 (diff) | |
download | tigervnc-0f49e22bdc0f9b8cfbaa420f114c5313c7ea68bd.tar.gz tigervnc-0f49e22bdc0f9b8cfbaa420f114c5313c7ea68bd.zip |
min and max changed to vncmin and vncmax. This solves many problems: Some platforms predefines or redefines these symbols. Some platforms have header files which chokes if min or max are defined.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@96 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'Xregion')
-rw-r--r-- | Xregion/Region.c | 7 | ||||
-rw-r--r-- | Xregion/Xregion.h | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/Xregion/Region.c b/Xregion/Region.c index bf2d123b..c0b1e5a2 100644 --- a/Xregion/Region.c +++ b/Xregion/Region.c @@ -78,6 +78,13 @@ SOFTWARE. #include "region.h" //#include "poly.h" +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + #ifdef DEBUG #include <stdio.h> #define assert(expr) {if (!(expr)) fprintf(stderr,\ diff --git a/Xregion/Xregion.h b/Xregion/Xregion.h index 7fa44d96..e8c9a4f9 100644 --- a/Xregion/Xregion.h +++ b/Xregion/Xregion.h @@ -61,14 +61,6 @@ SOFTWARE. #define Xfree free #define Xrealloc realloc -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif - -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - #define NeedFunctionPrototypes 1 // - Cribbed from Xlib.h |