Merge branch 'v4' of /Users/jrmuizel/src/qcms-benoit/git/qcms into v4

Conflicts:
	iccread.c
diff --git a/iccread.c b/iccread.c
index 5968c0d..5662023 100644
--- a/iccread.c
+++ b/iccread.c
@@ -50,7 +50,6 @@
 	return ((v & 0xff) << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | ((v & 0xff000000) >> 24);
 	//return __builtin_bswap32(v);
 #else
-sdfsdf;asdf;asdf;asdfdas
 	return v;
 #endif
 }
@@ -345,7 +344,8 @@
 #define LUT_MBA_TYPE		0x6d424120 // 'mBA '
 #define CHROMATIC_TYPE		0x73663332 // 'sf32'
 
-static struct matrix read_tag_s15Fixed16ArrayType(struct mem_source *src, struct tag_index index, uint32_t tag_id) {
+static struct matrix read_tag_s15Fixed16ArrayType(struct mem_source *src, struct tag_index index, uint32_t tag_id)
+{
 	struct tag *tag = find_tag(index, tag_id);
 	struct matrix matrix;
 	if (tag) {
@@ -860,8 +860,6 @@
 
 static void qcms_profile_fini(qcms_profile *profile)
 {
-	// REVIEW: This is called when some of these values are NULL.
-	// Is free()-ing NULL safe? I was told it was not safe on all platforms.
 	free(profile->redTRC);
 	free(profile->blueTRC);
 	free(profile->greenTRC);
diff --git a/transform_util.c b/transform_util.c
index 7ebf0a0..04be323 100644
--- a/transform_util.c
+++ b/transform_util.c
@@ -1,3 +1,5 @@
+#define _ISOC99_SOURCE  /* for INFINITY */
+
 #include <math.h>
 #include <assert.h>
 #include <string.h> //memcpy
@@ -5,6 +7,10 @@
 #include "transform_util.h"
 #include "matrix.h"
 
+#if !defined(INFINITY)
+#define INFINITY HUGE_VAL
+#endif
+
 #define PARAMETRIC_CURVE_TYPE 0x70617261 //'para'
 #define QCMS_NEGATIVE_INFINITY (-1.f/0.f)