add VIPS_SONAME etc.
helps check ABI and php-vips-ext lock the right library
This commit is contained in:
parent
c1ca76f6a2
commit
c31f4ec2d7
@ -14,6 +14,8 @@
|
|||||||
- add VIPS_META_PAGE_HEIGHT metadata
|
- add VIPS_META_PAGE_HEIGHT metadata
|
||||||
- IM6/IM7 magickload supports page/n/page-height, all_frames deprecated
|
- IM6/IM7 magickload supports page/n/page-height, all_frames deprecated
|
||||||
- gifload supports n/page-height
|
- gifload supports n/page-height
|
||||||
|
- added #defines for VIPS_SONAME, VIPS_LIBRARY_CURRENT, VIPS_LIBRARY_REVISION,
|
||||||
|
VIPS_LIBRARY_AGE
|
||||||
|
|
||||||
8/12/16 started 8.4.5
|
8/12/16 started 8.4.5
|
||||||
- allow libgsf-1.14.26 to help centos, thanks tdiprima
|
- allow libgsf-1.14.26 to help centos, thanks tdiprima
|
||||||
|
@ -64,6 +64,10 @@ EXTRA_DIST = \
|
|||||||
|
|
||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
|
|
||||||
|
all-local:
|
||||||
|
echo '/* This file is autogenerated, do not edit. */' > include/vips/soname.h; \
|
||||||
|
source libvips.la; echo "#define VIPS_SONAME \"$$dlname\"" >> include/vips/soname.h;
|
||||||
|
|
||||||
-include $(INTROSPECTION_MAKEFILE)
|
-include $(INTROSPECTION_MAKEFILE)
|
||||||
INTROSPECTION_GIRS =
|
INTROSPECTION_GIRS =
|
||||||
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
|
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
|
||||||
|
@ -37,6 +37,7 @@ pkginclude_HEADERS = \
|
|||||||
region.h \
|
region.h \
|
||||||
resample.h \
|
resample.h \
|
||||||
semaphore.h \
|
semaphore.h \
|
||||||
|
soname.h \
|
||||||
threadpool.h \
|
threadpool.h \
|
||||||
thread.h \
|
thread.h \
|
||||||
transform.h \
|
transform.h \
|
||||||
@ -70,6 +71,7 @@ vips_scan_headers = \
|
|||||||
${top_srcdir}/libvips/include/vips/morphology.h \
|
${top_srcdir}/libvips/include/vips/morphology.h \
|
||||||
${top_srcdir}/libvips/include/vips/draw.h \
|
${top_srcdir}/libvips/include/vips/draw.h \
|
||||||
${top_srcdir}/libvips/include/vips/basic.h \
|
${top_srcdir}/libvips/include/vips/basic.h \
|
||||||
|
${top_srcdir}/libvips/include/vips/version.h \
|
||||||
${top_srcdir}/libvips/include/vips/object.h
|
${top_srcdir}/libvips/include/vips/object.h
|
||||||
|
|
||||||
enumtypes.h: $(vips_scan_headers) Makefile
|
enumtypes.h: $(vips_scan_headers) Makefile
|
||||||
|
@ -56,11 +56,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#define VIPS_SIZEOF_HEADER (64)
|
#define VIPS_SIZEOF_HEADER (64)
|
||||||
|
|
||||||
/* Startup ABI check.
|
|
||||||
*/
|
|
||||||
int vips__init( const char *argv0 );
|
|
||||||
size_t vips__get_sizeof_vipsobject( void );
|
|
||||||
|
|
||||||
/* What we track for each mmap window. Have a list of these on an openin
|
/* What we track for each mmap window. Have a list of these on an openin
|
||||||
* VipsImage.
|
* VipsImage.
|
||||||
*/
|
*/
|
||||||
@ -183,6 +178,11 @@ void vips__demand_hint_array( struct _VipsImage *image,
|
|||||||
int vips__image_copy_fields_array( struct _VipsImage *out,
|
int vips__image_copy_fields_array( struct _VipsImage *out,
|
||||||
struct _VipsImage *in[] );
|
struct _VipsImage *in[] );
|
||||||
|
|
||||||
|
/* Deprecated.
|
||||||
|
*/
|
||||||
|
int vips__init( const char *argv0 );
|
||||||
|
size_t vips__get_sizeof_vipsobject( void );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /*__cplusplus*/
|
#endif /*__cplusplus*/
|
||||||
|
2
libvips/include/vips/soname.h
Normal file
2
libvips/include/vips/soname.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/* This file is autogenerated, do not edit. */
|
||||||
|
#define VIPS_SONAME "libvips.so.42"
|
@ -10,6 +10,21 @@
|
|||||||
#define VIPS_MINOR_VERSION (@VIPS_MINOR_VERSION@)
|
#define VIPS_MINOR_VERSION (@VIPS_MINOR_VERSION@)
|
||||||
#define VIPS_MICRO_VERSION (@VIPS_MICRO_VERSION@)
|
#define VIPS_MICRO_VERSION (@VIPS_MICRO_VERSION@)
|
||||||
|
|
||||||
|
/* The ABI version, as used for library versioning.
|
||||||
|
*/
|
||||||
|
#define VIPS_LIBRARY_CURRENT (@LIBRARY_CURRENT@)
|
||||||
|
#define VIPS_LIBRARY_REVISION (@LIBRARY_REVISION@)
|
||||||
|
#define VIPS_LIBRARY_AGE (@LIBRARY_AGE@)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VIPS_SONAME:
|
||||||
|
*
|
||||||
|
* The name of the shared object containing the vips library, for example
|
||||||
|
* "libvips.so.42", or "libvips-42.dll".
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "soname.h"
|
||||||
|
|
||||||
/* Not really anything to do with versions, but this is a handy place to put
|
/* Not really anything to do with versions, but this is a handy place to put
|
||||||
* it.
|
* it.
|
||||||
*/
|
*/
|
||||||
|
@ -164,14 +164,15 @@ extern "C" {
|
|||||||
* not have _().
|
* not have _().
|
||||||
*/
|
*/
|
||||||
#define VIPS_INIT( ARGV0 ) \
|
#define VIPS_INIT( ARGV0 ) \
|
||||||
(sizeof( VipsObject ) != vips__get_sizeof_vipsobject() ? ( \
|
(vips_version( 3 ) - vips_version( 5 ) != \
|
||||||
|
VIPS_LIBRARY_CURRENT - VIPS_LIBRARY_AGE ? ( \
|
||||||
vips_info( "vips_init", "ABI mismatch" ), \
|
vips_info( "vips_init", "ABI mismatch" ), \
|
||||||
vips_info( "vips_init", \
|
vips_info( "vips_init", \
|
||||||
"library has sizeof(VipsObject) == %zd", \
|
"library has ABI version %d", \
|
||||||
vips__get_sizeof_vipsobject() ), \
|
vips_version( 3 ) - vips_version( 5 ) ), \
|
||||||
vips_info( "vips_init", \
|
vips_info( "vips_init", \
|
||||||
"application has sizeof(VipsObject) == %zd", \
|
"application needs ABI version %d", \
|
||||||
sizeof( VipsObject ) ), \
|
VIPS_LIBRARY_CURRENT - VIPS_LIBRARY_AGE ), \
|
||||||
vips_error( "vips_init", "ABI mismatch" ), \
|
vips_error( "vips_init", "ABI mismatch" ), \
|
||||||
-1 ) : \
|
-1 ) : \
|
||||||
vips_init( ARGV0 ))
|
vips_init( ARGV0 ))
|
||||||
|
@ -68,6 +68,7 @@ vips_scan_headers = \
|
|||||||
${top_srcdir}/libvips/include/vips/morphology.h \
|
${top_srcdir}/libvips/include/vips/morphology.h \
|
||||||
${top_srcdir}/libvips/include/vips/draw.h \
|
${top_srcdir}/libvips/include/vips/draw.h \
|
||||||
${top_srcdir}/libvips/include/vips/basic.h \
|
${top_srcdir}/libvips/include/vips/basic.h \
|
||||||
|
${top_srcdir}/libvips/include/vips/version.h \
|
||||||
${top_srcdir}/libvips/include/vips/object.h
|
${top_srcdir}/libvips/include/vips/object.h
|
||||||
|
|
||||||
enumtypes.c: $(vips_scan_headers) Makefile
|
enumtypes.c: $(vips_scan_headers) Makefile
|
||||||
|
@ -432,20 +432,6 @@ vips_init( const char *argv0 )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the sizeof() various important data structures. These are checked
|
|
||||||
* against the headers used to build our caller by vips_init().
|
|
||||||
*
|
|
||||||
* We allow direct access to members of VipsImage and VipsRegion (mostly for
|
|
||||||
* reasons of history), so any change to a superclass of either of these
|
|
||||||
* objects will break our ABI.
|
|
||||||
*/
|
|
||||||
|
|
||||||
size_t
|
|
||||||
vips__get_sizeof_vipsobject( void )
|
|
||||||
{
|
|
||||||
return( sizeof( VipsObject ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Call this before vips stuff that uses stuff we need to have inited.
|
/* Call this before vips stuff that uses stuff we need to have inited.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@ -1029,6 +1015,9 @@ vips_version_string( void )
|
|||||||
* Get the major, minor or micro library version, with @flag values 0, 1 and
|
* Get the major, minor or micro library version, with @flag values 0, 1 and
|
||||||
* 2.
|
* 2.
|
||||||
*
|
*
|
||||||
|
* Get the ABI current, revision and age (as used by libtool) with @flag
|
||||||
|
* values 3, 4, 5.
|
||||||
|
*
|
||||||
* Returns: library version number
|
* Returns: library version number
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
@ -1044,8 +1033,17 @@ vips_version( int flag )
|
|||||||
case 2:
|
case 2:
|
||||||
return( VIPS_MICRO_VERSION );
|
return( VIPS_MICRO_VERSION );
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
return( VIPS_LIBRARY_CURRENT );
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
return( VIPS_LIBRARY_REVISION );
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
return( VIPS_LIBRARY_AGE );
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vips_error( "vips_version", "%s", _( "flag not 0, 1, 2" ) );
|
vips_error( "vips_version", "%s", _( "flag not in [0, 5]" ) );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1064,3 +1062,12 @@ vips_leak_set( gboolean leak )
|
|||||||
{
|
{
|
||||||
vips__leak = leak;
|
vips__leak = leak;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Deprecated.
|
||||||
|
*/
|
||||||
|
size_t
|
||||||
|
vips__get_sizeof_vipsobject( void )
|
||||||
|
{
|
||||||
|
return( sizeof( VipsObject ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user