bac82874036ee294850fcfe64cc6cba209c3262d
markd
  Tue Jun 25 09:41:44 2019 +0100
added some conditionals and renamed a variable to make files more friendly to include in C++ code

diff --git src/inc/common.h src/inc/common.h
index 64b71fa..4789bfd 100644
--- src/inc/common.h
+++ src/inc/common.h
@@ -1244,36 +1244,36 @@
 int roundingScale(int a, int p, int q);
 /* returns rounded a*p/q */
 
 int intAbs(int a);
 /* Return integer absolute value */
 
 #define logBase2(x)(log(x)/log(2))
 /* return log base two of number */
 
 #define round(a) ((int)((a)+0.5))
 /* Round floating point val to nearest integer. */
 
 #define roundll(a) ((long long)((a)+0.5))
 /* Round floating point val to nearest long long. */
 
-#ifndef min
+#if !(defined(min) || defined(__cplusplus))
 #define min(a,b) ( (a) < (b) ? (a) : (b) )
 /* Return min of a and b. */
 #endif
 
-#ifndef max
+#if !(defined(max) || defined(__cplusplus))
 #define max(a,b) ( (a) > (b) ? (a) : (b) )
 /* Return max of a and b. */
 #endif
 
 int  rangeIntersection(int start1, int end1, int start2, int end2);
 /* Return amount of bases two ranges intersect over, 0 or negative if no
  * intersection. */
 
 int  positiveRangeIntersection(int start1, int end1, int start2, int end2);
 /* Return amount of bases two ranges intersect over, 0 if no
  * intersection. */
 
 INLINE void memRead(char **pPt, void *buf, int size)
 /* Copy memory from *pPt to buf, and advance *pPt by size. */
 {