From ff62f3f1e01421afc7cf27d701d6facaa26ddfca Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?utf8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Mon, 8 Apr 2013 14:42:15 +0400 Subject: [PATCH] libsabi: Special struct size values for W32 These account for both possible type size mismatch AND -mms-bitfields packing. Sizes are taken from an i686-w64-mingw32-built GStreamer, gcc 4.8.0, mingw-w64 svn-r5685. Fixes #697551 --- tests/check/gst/gstabi.c | 4 ++ tests/check/gst/struct_i386w.h | 72 ++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 tests/check/gst/struct_i386w.h diff --git a/tests/check/gst/gstabi.c b/tests/check/gst/gstabi.c index a9e2fd6e97..2356cb10ac 100644 --- a/tests/check/gst/gstabi.c +++ b/tests/check/gst/gstabi.c @@ -23,7 +23,11 @@ #include #ifdef HAVE_CPU_I386 +#ifndef G_OS_WIN32 #include "struct_i386.h" +#else +#include "struct_i386w.h" +#endif #define HAVE_ABI_SIZES TRUE #else #ifdef __powerpc64__ diff --git a/tests/check/gst/struct_i386w.h b/tests/check/gst/struct_i386w.h new file mode 100644 index 0000000000..fc7a571d1b --- /dev/null +++ b/tests/check/gst/struct_i386w.h @@ -0,0 +1,72 @@ +static GstCheckABIStruct list[] = { + {"GstAllocationParams", sizeof (GstAllocationParams), 32}, + {"GstAllocator", sizeof (GstAllocator), 112}, + {"GstAllocatorClass", sizeof (GstAllocatorClass), 116}, + {"GstBinClass", sizeof (GstBinClass), 292}, + {"GstBin", sizeof (GstBin), 248}, + {"GstBuffer", sizeof (GstBuffer), 80}, + {"GstBufferPoolAcquireParams", sizeof (GstBufferPoolAcquireParams), 48}, + {"GstBufferPool", sizeof (GstBufferPool), 88}, + {"GstBufferPoolClass", sizeof (GstBufferPoolClass), 144}, + {"GstBusClass", sizeof (GstBusClass), 116}, + {"GstBus", sizeof (GstBus), 88}, + {"GstCaps", sizeof (GstCaps), 36}, + {"GstChildProxyInterface", sizeof (GstChildProxyInterface), 44}, + {"GstClockClass", sizeof (GstClockClass), 132}, + {"GstClockEntry", sizeof (GstClockEntry), 72}, + {"GstClock", sizeof (GstClock), 88}, + {"GstControlBinding", sizeof (GstControlBinding), 96}, + {"GstControlBindingClass", sizeof (GstControlBindingClass), 124}, + {"GstControlSource", sizeof (GstControlSource), 88}, + {"GstControlSourceClass", sizeof (GstControlSourceClass), 108}, + {"GstDebugCategory", sizeof (GstDebugCategory), 16}, + {"GstElementClass", sizeof (GstElementClass), 248}, + {"GstElement", sizeof (GstElement), 184}, + {"GstEvent", sizeof (GstEvent), 56}, + {"GstFormatDefinition", sizeof (GstFormatDefinition), 16}, + {"GstGhostPadClass", sizeof (GstGhostPadClass), 136}, + {"GstGhostPad", sizeof (GstGhostPad), 320}, + {"GstIterator", sizeof (GstIterator), 60}, + {"GstMemory", sizeof (GstMemory), 60}, + {"GstMapInfo", sizeof (GstMapInfo), 52}, + {"GstMessage", sizeof (GstMessage), 80}, + {"GstMeta", sizeof (GstMeta), 8}, + {"GstMetaTransformCopy", sizeof (GstMetaTransformCopy), 12}, + {"GstMetaInfo", sizeof (GstMetaInfo), 40}, + {"GstMiniObject", sizeof (GstMiniObject), 36}, + {"GstObjectClass", sizeof (GstObjectClass), 92}, + {"GstObject", sizeof (GstObject), 64}, + {"GstPadClass", sizeof (GstPadClass), 116}, + {"GstPad", sizeof (GstPad), 304}, + {"GstPadProbeInfo", sizeof (GstPadProbeInfo), 48}, + {"GstPadTemplateClass", sizeof (GstPadTemplateClass), 112}, + {"GstPadTemplate", sizeof (GstPadTemplate), 96}, + {"GstParamSpecFraction", sizeof (GstParamSpecFraction), 64}, + {"GstPipelineClass", sizeof (GstPipelineClass), 308}, + {"GstPipeline", sizeof (GstPipeline), 296}, + {"GstPluginDesc", sizeof (GstPluginDesc), 60}, + {"GstPresetInterface", sizeof (GstPresetInterface), 56}, + {"GstProxyPadClass", sizeof (GstProxyPadClass), 120}, + {"GstProxyPad", sizeof (GstProxyPad), 312}, + {"GstQuery", sizeof (GstQuery), 40}, + {"GstRegistryClass", sizeof (GstRegistryClass), 92}, + {"GstRegistry", sizeof (GstRegistry), 72}, + {"GstSegment", sizeof (GstSegment), 104}, + {"GstStaticCaps", sizeof (GstStaticCaps), 24}, + {"GstStaticPadTemplate", sizeof (GstStaticPadTemplate), 36}, + {"GstStructure", sizeof (GstStructure), 8}, + {"GstSystemClockClass", sizeof (GstSystemClockClass), 148}, + {"GstSystemClock", sizeof (GstSystemClock), 112}, + {"GstTagList", sizeof (GstTagList), 36}, + {"GstTagSetterInterface", sizeof (GstTagSetterInterface), 8}, + {"GstTaskClass", sizeof (GstTaskClass), 112}, + {"GstTask", sizeof (GstTask), 128}, + {"GstTaskPoolClass", sizeof (GstTaskPoolClass), 124}, + {"GstTaskPool", sizeof (GstTaskPool), 88}, + {"GstTimedValue", sizeof (GstTimedValue), 16}, + {"GstTocSetterInterface", sizeof (GstTocSetterInterface), 8}, + {"GstTypeFind", sizeof (GstTypeFind), 32}, + {"GstURIHandlerInterface", sizeof (GstURIHandlerInterface), 24}, + {"GstValueTable", sizeof (GstValueTable), 32}, + {NULL, 0, 0} +}; -- 2.34.1