Stability of internal ABI.

Daniel Kobras <[email protected]> Mon, 1 Feb 2010 23:38:31 +0100
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi!

Packaging the latest GM release, I noticed that several symbols were no longer
exported from the library in 1.3.8, compared to 1.3.5. Non of these were part
of the official API. However, they need to be exported to coders in a modular
build and therefore end up as part of the library's ABI. Technically, any
removal of those symbols requires a SONAME change (and therefore triggers the
alarm bells in our packaging tools.) For now, I've added distro-specific
patches to ensure a stable ABI (attached for reference), reverting some changes
and adding stubs for others as appropriate. Do you consider stability of the
GM-internal ABI a worthwhile goal, or should we treat those symbols
differently?

Regards,

Daniel.


--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=add_dps_stubs

Add stub definition of Un/RegisterDPSImage to preserver ABI when building without libdps.

--- a/magick/static.c	Fri Jan 29 00:34:54 2010 +0100
+++ b/magick/static.c	Fri Jan 29 00:44:45 2010 +0100
@@ -408,3 +408,16 @@
   UnregisterYUVImage();
 #endif /* !defined(BuildMagickModules) */
 }
+
+#define AddStub(module) \
+  MagickExport void Register##module##Image(void) { return; } \
+  MagickExport void Unregister##module##Image(void) { return; }
+
+/* Add stub definitions to ensure ABI doesn't change whether certain libs
+   are available or not. */
+#if !defined(BuildMagickModules)
+/* So far we only care about DPS. Other should be added as necessary. */
+# if !defined(HasDPS)
+AddStub(DPS)
+# endif
+#endif /* !defined(BuildMagickModules) */

--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=revert_text_constants_abi_change

Put back global string constants to revert ABI change.

Binary file .swp has changed
--- a/magick/image.c	Fri Jan 29 00:11:40 2010 +0100
+++ b/magick/image.c	Fri Jan 29 00:17:37 2010 +0100
@@ -84,9 +84,13 @@
   *DefaultTileLabel = "%f\n%wx%h\n%b",
   *ForegroundColor = "#000000000000",  /* black */
   *HighlightColor = "#f1f100001e1e", /* light red */
+  *LoadImageText = "[%s] Loading image: %lux%lu...  ",
+  *LoadImagesText = "[%s] Loading images...  ",
   *MatteColor = "#bdbdbdbdbdbd",  /* gray */
   *PSDensityGeometry = "72.0x72.0",
-  *PSPageGeometry = "612x792>";
+  *PSPageGeometry = "612x792>",
+  *SaveImageText = "[%s] Saving image: %lux%lu...  ",
+  *SaveImagesText = "[%s] Saving images...  ";
 
 const unsigned long
   DefaultCompressionQuality = 75;
--- a/magick/studio.h	Fri Jan 29 00:11:40 2010 +0100
+++ b/magick/studio.h	Fri Jan 29 00:17:37 2010 +0100
@@ -460,14 +460,13 @@
   *DefaultTileLabel,
   *ForegroundColor,
   *HighlightColor,
+  *LoadImageText,
+  *LoadImagesText,
   *MatteColor,
   *PSDensityGeometry,
-  *PSPageGeometry;
-
-#define LoadImageText "[%s] Loading image: %lux%lu...  "
-#define SaveImageText "[%s] Saving image: %lux%lu...  "
-#define LoadImagesText "[%s] Loading images...  "
-#define SaveImagesText "[%s] Saving images...  "
+  *PSPageGeometry,
+  *SaveImageText,
+  *SaveImagesText;
 
 extern MagickExport const unsigned long
   DefaultCompressionQuality;

--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-core

--nFreZHaLTZJo0R7j--