summaryrefslogtreecommitdiff
path: root/jpwl
diff options
context:
space:
mode:
authorGiuseppe Baruffa <gbaruffa@users.noreply.github.com>2006-12-07 18:46:28 +0000
committerGiuseppe Baruffa <gbaruffa@users.noreply.github.com>2006-12-07 18:46:28 +0000
commit76ee6b84417a5476b8b3eb7c326d3f38e3f3a998 (patch)
tree98f34cec38f62e9b8ec3f87a9f52f241e3797d8e /jpwl
parent3adfd1860295da3ef57871d6eb3615d1596f9ed1 (diff)
+ Antonin verified that the MacOS build of JPWL module suffered from a missing definition of the "min" macro; I've added this into both jpwl.h and rs.h
Diffstat (limited to 'jpwl')
-rw-r--r--jpwl/JPWL_image_to_j2k.dsp2
-rw-r--r--jpwl/jpwl.h10
-rw-r--r--jpwl/rs.h9
3 files changed, 20 insertions, 1 deletions
diff --git a/jpwl/JPWL_image_to_j2k.dsp b/jpwl/JPWL_image_to_j2k.dsp
index f1fb5385..f924ee18 100644
--- a/jpwl/JPWL_image_to_j2k.dsp
+++ b/jpwl/JPWL_image_to_j2k.dsp
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libopenjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "OPJ_STATIC" /D "USE_JPWL" /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libopenjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "OPJ_STATIC" /D "USE_JPWL" /FR /FD /GZ /c
# ADD BASE RSC /l 0x80c /d "_DEBUG"
# ADD RSC /l 0x80c /d "_DEBUG"
BSC32=bscmake.exe
diff --git a/jpwl/jpwl.h b/jpwl/jpwl.h
index a533e3a3..8af80fdb 100644
--- a/jpwl/jpwl.h
+++ b/jpwl/jpwl.h
@@ -365,6 +365,16 @@ and get the CRC at the end
*/
#define jpwl_updateCRC32(CRC, DATA) updateCRC32(CRC, DATA)
+/**
+Computes the minimum between two integers
+@param a first integer to compare
+@param b second integer to compare
+@return returns the minimum integer between a and b
+*/
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif /* min */
+
/*@}*/
#endif /* USE_JPWL */
diff --git a/jpwl/rs.h b/jpwl/rs.h
index b303af79..047d9c2f 100644
--- a/jpwl/rs.h
+++ b/jpwl/rs.h
@@ -94,6 +94,15 @@ int encode_rs(dtype data[], dtype bb[]);
*/
int eras_dec_rs(dtype data[], int eras_pos[], int no_eras);
+/**
+Computes the minimum between two integers
+@param a first integer to compare
+@param b second integer to compare
+@return returns the minimum integer between a and b
+*/
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif /* min */
#endif /* __CRC32_HEADER__ */