Commits

Pierre Joye committed ba8f21a

skip if jpeg version >= 8

Comments (0)

Files changed (1)

tests/jpeg/jpeg_read.c

 #include <stdio.h>
 #include <stdlib.h>
 #include "gdtest.h"
+#include <jpeglib.h>
 
 #ifdef _MSC_VER
 # define snprintf _snprintf
 	FILE *fp;
 	char path[1024];
 
+#if defined(JPEG_LIB_VERSION_MAJOR) && JPEG_LIB_VERSION_MAJOR >= 8
+	printf("skip, JPEG Major version too high (%i)\n", JPEG_LIB_VERSION_MAJOR);
+	return 0;
+#else
 	snprintf(path, sizeof(path)-1, "%s/jpeg/conv_test.jpeg", GDTEST_TOP_DIR);
 	fp = fopen(path, "rb");
 	if (!fp) {
 	}
 
 	return 0;
+#endif
 }