From abfb5a5fc53d0e7eb7371a152140135c122eefea Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 15 Oct 2013 21:33:59 +0100 Subject: [PATCH 1/3] rename jpeg bool type another attempt at fixing this mess --- ChangeLog | 2 +- libvips/foreign/jpeg.h | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4558e8f..a7eb393d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 3/10/13 started 7.36.2 - better jpeg startup -- change jpeg bool type to uchar to match IM's expectations, thanks MvGulik +- rename jpeg bool type to reduce confusion between libraries 3/10/13 started 7.36.1 - fix to help OS X build diff --git a/libvips/foreign/jpeg.h b/libvips/foreign/jpeg.h index 4588b1ae..3b75da17 100644 --- a/libvips/foreign/jpeg.h +++ b/libvips/foreign/jpeg.h @@ -43,12 +43,9 @@ extern "C" { #endif /*HAVE_STDLIB_H*/ /* jpeglib defines its own boolean type which then clashes with everyone - * elses. Turn it off and make our own. - * - * It has to be uchar to match imagemagick's expectations. + * elses. Rename it as jboolean. */ -#define HAVE_BOOLEAN -typedef unsigned char boolean; +#define boolean jboolean #include #include From ec603594c1cd20ba38db84fb91b27288d1720e61 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 17 Oct 2013 09:43:18 +0100 Subject: [PATCH 2/3] another small boolean fix fixes a break on OS X with IJG jpeg --- libvips/foreign/jpeg.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libvips/foreign/jpeg.h b/libvips/foreign/jpeg.h index 3b75da17..ac7e6edc 100644 --- a/libvips/foreign/jpeg.h +++ b/libvips/foreign/jpeg.h @@ -42,11 +42,22 @@ extern "C" { #undef HAVE_STDLIB_H #endif /*HAVE_STDLIB_H*/ -/* jpeglib defines its own boolean type which then clashes with everyone - * elses. Rename it as jboolean. +/* jpeglib defines its own boolean type as an enum which then clashes with + * everyone elses. Rename it as jboolean. */ #define boolean jboolean +/* Any TRUE/FALSE macros which have crept in will cause terrible confusion as + * well. + */ +#ifdef TRUE +#undef TRUE +#endif /*TRUE*/ + +#ifdef FALSE +#undef FALSE +#endif /*FALSE*/ + #include #include From ece34465f0ebfc2f60fcc009ddaaae20158cf654 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 18 Oct 2013 09:13:24 +0100 Subject: [PATCH 3/3] fix compiler warnings 13.10 produces a few new ones --- ChangeLog | 5 ++++- TODO | 11 +++++++++++ configure.ac | 6 +++--- libvips/cimg/CImg.h | 3 +++ libvips/foreign/dbh.h | 7 +++++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7eb393d..23dfb8c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -3/10/13 started 7.36.2 +18/10/13 started 7.36.3 +- fix compiler warnings in ubuntu 13.10 + +10/10/13 started 7.36.2 - better jpeg startup - rename jpeg bool type to reduce confusion between libraries diff --git a/TODO b/TODO index 6bed42e7..b1a8e71f 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,17 @@ Next version ============ +- make vips_init() into a macro, check sizes of important structs against size + at library compile time + + add a new API call like vips__get_sizeof_image() which returns + sizeof(VipsImage) from library compile time, compare that to the application + compile-time value + + vips_init() macro then passes control on to vips__init() for real startup + + breaks binary API sadly + - do conv and morph quickly as simple wrappers over the vips7 operations - do much fancier profiling with timing on all locks saved in memory and diff --git a/configure.ac b/configure.ac index 2c2caa4b..3cb0e2c3 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # also update the version number in the m4 macros below -AC_INIT([vips], [7.36.2], [vipsip@jiscmail.ac.uk]) +AC_INIT([vips], [7.36.3], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ(2.62) @@ -17,7 +17,7 @@ AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [7]) m4_define([vips_minor_version], [36]) -m4_define([vips_micro_version], [2]) +m4_define([vips_micro_version], [3]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) @@ -37,7 +37,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date` # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=35 -LIBRARY_REVISION=2 +LIBRARY_REVISION=3 LIBRARY_AGE=0 # patched into include/vips/version.h diff --git a/libvips/cimg/CImg.h b/libvips/cimg/CImg.h index 63db0077..1a0a9d31 100644 --- a/libvips/cimg/CImg.h +++ b/libvips/cimg/CImg.h @@ -17860,8 +17860,11 @@ namespace cimg_library { static CImg get_load_pandore(std::FILE *const file, const char *const filename=0) { std::FILE *const nfile = file?file:cimg::fopen(filename,"rb"); typedef unsigned char uchar; + /* Don't use these two and they cause warnings. + * typedef unsigned short ushort; typedef unsigned int uint; + */ typedef unsigned long ulong; CImg dest; char tmp[32]; diff --git a/libvips/foreign/dbh.h b/libvips/foreign/dbh.h index 782cbf67..f3f56791 100644 --- a/libvips/foreign/dbh.h +++ b/libvips/foreign/dbh.h @@ -87,7 +87,14 @@ struct dsr /* dsr */ }; /* total=348 */ /* Acceptable values for hdr.dime.datatype */ + +/* + * commented this one out: we don't use it, and dirent.h defines this on some + * platforms. + * #define DT_UNKNOWN 0 + */ + #define DT_BINARY 1 #define DT_UNSIGNED_CHAR 2 #define DT_SIGNED_SHORT 4