From e2b1bd09100190c1d59a78ec2565930201498643 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 7 Aug 2008 11:47:36 +0000 Subject: [PATCH] stuff --- ChangeLog | 2 +- include/vips/vips.h | 15 ++++++++++----- libsrc/iofuncs/im_init_world.c | 13 ------------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8d682b5..67527867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,7 +38,7 @@ - added IM_LIBDIR, im_guess_libdir() - load plugins from libdir/vips-x.x on startup - added meta get/set int/double/string to C++ API -- remove time_t from vips.h, check size in im_init_world, thanks nicola +- include time_t in vips.h, thanks nicola 25/1/08 started 7.14.0 - bump all version numbers for new stable diff --git a/include/vips/vips.h b/include/vips/vips.h index d97b1234..8a415842 100644 --- a/include/vips/vips.h +++ b/include/vips/vips.h @@ -43,7 +43,7 @@ * 2/7/08 * - added invalidate callbacks * 7/8/08 - * - remove time_t, thanks nicola + * - include , thanks nicola */ /* @@ -90,6 +90,10 @@ extern "C" { #include #include +/* Needed for 'unused' below. Remove this when we remove that. + */ +#include + #include #include @@ -243,13 +247,14 @@ typedef struct { /* Struct we keep a record of execution time in. Passed to eval callback, so * it can assess progress. * - * The 'unused' field is there for binary compatibility, it used to be a - * time_t. sizeof(time_t)==8 is checked in libsrc/iofuncs/im_init_world.c. - * We don't want to include time.h in vips.h if we don't have to. + * The 'unused' field is there for binary compatibility, remove this when we + * break ABI. Though, at least on windows, sizeof(time_t) can vary with + * compiler flags, so we might break ABI anyway. Remove the #include + * when we remove this. */ typedef struct { struct im__IMAGE *im; /* Image we are part of */ - char unused[8]; /* FIXME ... for binary compatibility */ + time_t unused; /* FIXME ... for binary compatibility */ int run; /* Time we have been running */ int eta; /* Estimated seconds of computation left */ gint64 tpels; /* Number of pels we expect to calculate */ diff --git a/libsrc/iofuncs/im_init_world.c b/libsrc/iofuncs/im_init_world.c index 4fbcc0d5..3b2186e8 100644 --- a/libsrc/iofuncs/im_init_world.c +++ b/libsrc/iofuncs/im_init_world.c @@ -19,8 +19,6 @@ * - progress feedback option * 5/8/08 * - load plugins from libdir/vips-x.x - * 7/8/08 - * - check sizeof(time_t), thanks nicola */ /* @@ -62,10 +60,6 @@ #include #include -/* Needed for the sizeof(time_t)==8 check, see vips.h - */ -#include - #ifdef HAVE_LIBOIL #include #endif /*HAVE_LIBOIL*/ @@ -141,13 +135,6 @@ im_init_world( const char *argv0 ) */ im__meta_init_types(); - /* See vips.h ... we used to have a time_t in part of the header, - * check this. - */ - if( sizeof( time_t ) != 8 ) - im_warn( "im_init_world", _( "sizeof( time_t ) != 8: " - "ABI break possible" ) ); - /* Load up any plugins in the vips libdir. We don't error on failure, * it's too annoying to have VIPS refuse to start because of a broken * plugin.