From 91a59d5af59a4e3a0cebbaba391d38debc7a525d Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Mon, 7 Jan 2008 09:47:49 +0000 Subject: [PATCH] tests/check/: Decide which header to include based on the userland ABI target and not the kernel/cpu. Fix up structur... Original commit message from CVS: Patch by: Alexis Ballier * tests/check/gst/gstabi.c: * tests/check/gst/struct_ppc64.h: * tests/check/libs/libsabi.c: * tests/check/libs/struct_ppc64.h: Decide which header to include based on the userland ABI target and not the kernel/cpu. Fix up structure sizes of ppc64 header for 64-bit userland (#503590). Might need something similar for x86 too. --- ChangeLog | 13 ++++ tests/check/gst/gstabi.c | 8 +-- tests/check/gst/struct_ppc64.h | 140 ++++++++++++++++++++-------------------- tests/check/libs/libsabi.c | 8 +-- tests/check/libs/struct_ppc64.h | 66 ++++++++++++------- 5 files changed, 135 insertions(+), 100 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49dee73..9b3b4da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-01-07 Tim-Philipp Müller + + Patch by: Alexis Ballier + + * tests/check/gst/gstabi.c: + * tests/check/gst/struct_ppc64.h: + * tests/check/libs/libsabi.c: + * tests/check/libs/struct_ppc64.h: + Decide which header to include based on the userland ABI target + and not the kernel/cpu. Fix up structure sizes of ppc64 header + for 64-bit userland (#503590). Might need something similar for + x86 too. + 2008-01-05 Tim-Philipp Müller * gst/gstdebugutils.c: (_gst_debug_bin_to_dot_file): diff --git a/tests/check/gst/gstabi.c b/tests/check/gst/gstabi.c index a78287b..9a98208 100644 --- a/tests/check/gst/gstabi.c +++ b/tests/check/gst/gstabi.c @@ -26,12 +26,12 @@ #include "struct_i386.h" #define HAVE_ABI_SIZES TRUE #else -#ifdef HAVE_CPU_PPC -#include "struct_ppc32.h" +#ifdef __powerpc64__ +#include "struct_ppc64.h" #define HAVE_ABI_SIZES TRUE #else -#ifdef HAVE_CPU_PPC64 -#include "struct_ppc64.h" +#ifdef __powerpc__ +#include "struct_ppc32.h" #define HAVE_ABI_SIZES TRUE #else #ifdef HAVE_CPU_X86_64 diff --git a/tests/check/gst/struct_ppc64.h b/tests/check/gst/struct_ppc64.h index 64ee4f0..477ce03 100644 --- a/tests/check/gst/struct_ppc64.h +++ b/tests/check/gst/struct_ppc64.h @@ -1,75 +1,75 @@ GstCheckABIStruct list[] = { - {"GstBin", sizeof (GstBin), 192}, - {"GstBinClass", sizeof (GstBinClass), 288}, - {"GstBuffer", sizeof (GstBuffer), 88}, - {"GstBufferClass", sizeof (GstBufferClass), 16}, - {"GstBus", sizeof (GstBus), 80}, - {"GstBusClass", sizeof (GstBusClass), 144}, - {"GstCaps", sizeof (GstCaps), 32}, - {"GstStaticCaps", sizeof (GstStaticCaps), 52}, - {"GstChildProxyInterface", sizeof (GstChildProxyInterface), 40}, - {"GstClockEntry", sizeof (GstClockEntry), 48}, - {"GstClock", sizeof (GstClock), 176}, - {"GstClockClass", sizeof (GstClockClass), 160}, - {"GstElement", sizeof (GstElement), 136}, - {"GstElementClass", sizeof (GstElementClass), 248}, - {"GstElementFactory", sizeof (GstElementFactory), 144}, - {"GstElementFactoryClass", sizeof (GstElementFactoryClass), 152}, - {"GstElementDetails", sizeof (GstElementDetails), 32}, - {"GstEvent", sizeof (GstEvent), 48}, - {"GstEventClass", sizeof (GstEventClass), 32}, - {"GstFormatDefinition", sizeof (GstFormatDefinition), 16}, - {"GstIndexEntry", sizeof (GstIndexEntry), 20}, - {"GstIndexGroup", sizeof (GstIndexGroup), 16}, - {"GstIndex", sizeof (GstIndex), 100}, - {"GstIndexClass", sizeof (GstIndexClass), 156}, - {"GstIndexAssociation", sizeof (GstIndexAssociation), 16}, - {"GstIndexFactory", sizeof (GstIndexFactory), 96}, - {"GstIndexFactoryClass", sizeof (GstIndexFactoryClass), 152}, - {"GstDebugCategory", sizeof (GstDebugCategory), 16}, - {"GstImplementsInterfaceClass", sizeof (GstImplementsInterfaceClass), 28}, - {"GstIterator", sizeof (GstIterator), 52}, - {"GstMessage", sizeof (GstMessage), 64}, - {"GstMessageClass", sizeof (GstMessageClass), 32}, - {"GstMiniObject", sizeof (GstMiniObject), 16}, - {"GstMiniObjectClass", sizeof (GstMiniObjectClass), 16}, - {"GstObject", sizeof (GstObject), 40}, - {"GstObjectClass", sizeof (GstObjectClass), 120}, - {"GstPad", sizeof (GstPad), 188}, - {"GstPadClass", sizeof (GstPadClass), 152}, - {"GstPadTemplate", sizeof (GstPadTemplate), 72}, - {"GstPadTemplateClass", sizeof (GstPadTemplateClass), 140}, - {"GstStaticPadTemplate", sizeof (GstStaticPadTemplate), 64}, - {"GstPipeline", sizeof (GstPipeline), 232}, - {"GstPipelineClass", sizeof (GstPipelineClass), 304}, - {"GstPlugin", sizeof (GstPlugin), 152}, - {"GstPluginClass", sizeof (GstPluginClass), 136}, - {"GstPluginDesc", sizeof (GstPluginDesc), 56}, - {"GstPluginFeature", sizeof (GstPluginFeature), 72}, - {"GstPluginFeatureClass", sizeof (GstPluginFeatureClass), 136}, - {"GstQueryTypeDefinition", sizeof (GstQueryTypeDefinition), 16}, - {"GstQuery", sizeof (GstQuery), 28}, - {"GstQueryClass", sizeof (GstQueryClass), 32}, - {"GstRegistry", sizeof (GstRegistry), 72}, - {"GstRegistryClass", sizeof (GstRegistryClass), 144}, - {"GstSegment", sizeof (GstSegment), 88}, - {"GstStructure", sizeof (GstStructure), 20}, - {"GstSystemClock", sizeof (GstSystemClock), 200}, - {"GstSystemClockClass", sizeof (GstSystemClockClass), 176}, - {"GstTagSetterIFace", sizeof (GstTagSetterIFace), 8}, - {"GstTask", sizeof (GstTask), 80}, - {"GstTaskClass", sizeof (GstTaskClass), 140}, - {"GstTrace", sizeof (GstTrace), 20}, - {"GstTraceEntry", sizeof (GstTraceEntry), 128}, - {"GstAllocTrace", sizeof (GstAllocTrace), 16}, - {"GstTypeFind", sizeof (GstTypeFind), 32}, - {"GstTypeFindFactory", sizeof (GstTypeFindFactory), 108}, - {"GstTypeFindFactoryClass", sizeof (GstTypeFindFactoryClass), 152}, - {"GstURIHandlerInterface", sizeof (GstURIHandlerInterface), 44}, - {"GstValueTable", sizeof (GstValueTable), 32}, + {"GstBin", sizeof (GstBin), 336}, + {"GstBinClass", sizeof (GstBinClass), 568}, + {"GstBuffer", sizeof (GstBuffer), 120} , + {"GstBufferClass", sizeof (GstBufferClass), 32} , + {"GstBus", sizeof (GstBus), 152} , + {"GstBusClass", sizeof (GstBusClass), 288} , + {"GstCaps", sizeof (GstCaps), 56} , + {"GstStaticCaps", sizeof (GstStaticCaps), 96} , + {"GstChildProxyInterface", sizeof (GstChildProxyInterface), 80} , + {"GstClockEntry", sizeof (GstClockEntry), 64} , + {"GstClock", sizeof (GstClock), 240} , + {"GstClockClass", sizeof (GstClockClass), 320} , + {"GstElement", sizeof (GstElement), 232} , + {"GstElementClass", sizeof (GstElementClass), 488} , + {"GstElementFactory", sizeof (GstElementFactory), 280} , + {"GstElementFactoryClass", sizeof (GstElementFactoryClass), 304} , + {"GstElementDetails", sizeof (GstElementDetails), 64} , + {"GstEvent", sizeof (GstEvent), 64} , + {"GstEventClass", sizeof (GstEventClass), 64} , + {"GstFormatDefinition", sizeof (GstFormatDefinition), 32} , + {"GstIndexEntry", sizeof (GstIndexEntry), 32} , + {"GstIndexGroup", sizeof (GstIndexGroup), 24} , + {"GstIndex", sizeof (GstIndex), 192} , + {"GstIndexClass", sizeof (GstIndexClass), 312} , + {"GstIndexAssociation", sizeof (GstIndexAssociation), 16} , + {"GstIndexFactory", sizeof (GstIndexFactory), 192} , + {"GstIndexFactoryClass", sizeof (GstIndexFactoryClass), 304} , + {"GstDebugCategory", sizeof (GstDebugCategory), 24} , + {"GstImplementsInterfaceClass", sizeof (GstImplementsInterfaceClass), 56} , + {"GstIterator", sizeof (GstIterator), 104} , + {"GstMessage", sizeof (GstMessage), 104} , + {"GstMessageClass", sizeof (GstMessageClass), 64} , + {"GstMiniObject", sizeof (GstMiniObject), 24} , + {"GstMiniObjectClass", sizeof (GstMiniObjectClass), 32} , + {"GstObject", sizeof (GstObject), 80} , + {"GstObjectClass", sizeof (GstObjectClass), 240} , + {"GstPad", sizeof (GstPad), 368} , + {"GstPadClass", sizeof (GstPadClass), 304} , + {"GstPadTemplate", sizeof (GstPadTemplate), 136} , + {"GstPadTemplateClass", sizeof (GstPadTemplateClass), 280} , + {"GstStaticPadTemplate", sizeof (GstStaticPadTemplate), 112} , + {"GstPipeline", sizeof (GstPipeline), 392} , + {"GstPipelineClass", sizeof (GstPipelineClass), 600} , + {"GstPlugin", sizeof (GstPlugin), 280} , + {"GstPluginClass", sizeof (GstPluginClass), 272} , + {"GstPluginDesc", sizeof (GstPluginDesc), 104} , + {"GstPluginFeature", sizeof (GstPluginFeature), 144} , + {"GstPluginFeatureClass", sizeof (GstPluginFeatureClass), 272} , + {"GstQueryTypeDefinition", sizeof (GstQueryTypeDefinition), 32} , + {"GstQuery", sizeof (GstQuery), 48} , + {"GstQueryClass", sizeof (GstQueryClass), 64} , + {"GstRegistry", sizeof (GstRegistry), 144} , + {"GstRegistryClass", sizeof (GstRegistryClass), 288} , + {"GstSegment", sizeof (GstSegment), 104} , + {"GstStructure", sizeof (GstStructure), 40} , + {"GstSystemClock", sizeof (GstSystemClock), 288} , + {"GstSystemClockClass", sizeof (GstSystemClockClass), 352} , + {"GstTagSetterIFace", sizeof (GstTagSetterIFace), 16} , + {"GstTask", sizeof (GstTask), 160} , + {"GstTaskClass", sizeof (GstTaskClass), 280} , + {"GstTrace", sizeof (GstTrace), 32} , + {"GstTraceEntry", sizeof (GstTraceEntry), 128} , + {"GstAllocTrace", sizeof (GstAllocTrace), 24} , + {"GstTypeFind", sizeof (GstTypeFind), 64} , + {"GstTypeFindFactory", sizeof (GstTypeFindFactory), 216} , + {"GstTypeFindFactoryClass", sizeof (GstTypeFindFactoryClass), 304} , + {"GstURIHandlerInterface", sizeof (GstURIHandlerInterface), 88} , + {"GstValueTable", sizeof (GstValueTable), 64} , #ifndef GST_DISABLE_LOADSAVE - {"GstXML", sizeof (GstXML), 64}, - {"GstXMLClass", sizeof (GstXMLClass), 144}, + {"GstXML", sizeof (GstXML), 128} , + {"GstXMLClass", sizeof (GstXMLClass), 288} , #endif {NULL, 0, 0} }; diff --git a/tests/check/libs/libsabi.c b/tests/check/libs/libsabi.c index e2affb3..7fce1f3 100644 --- a/tests/check/libs/libsabi.c +++ b/tests/check/libs/libsabi.c @@ -39,12 +39,12 @@ #include "struct_i386.h" #define HAVE_ABI_SIZES TRUE #else -#ifdef HAVE_CPU_PPC -#include "struct_ppc32.h" +#ifdef __powerpc64__ +#include "struct_ppc64.h" #define HAVE_ABI_SIZES TRUE #else -#ifdef HAVE_CPU_PPC64 -#include "struct_ppc64.h" +#ifdef __powerpc__ +#include "struct_ppc32.h" #define HAVE_ABI_SIZES TRUE #else #ifdef HAVE_CPU_X86_64 diff --git a/tests/check/libs/struct_ppc64.h b/tests/check/libs/struct_ppc64.h index a3ca167..353ceaa 100644 --- a/tests/check/libs/struct_ppc64.h +++ b/tests/check/libs/struct_ppc64.h @@ -1,25 +1,47 @@ GstCheckABIStruct list[] = { - {"GstAdapter", sizeof (GstAdapter), 52}, - {"GstAdapterClass", sizeof (GstAdapterClass), 84}, - {"GstBaseSink", sizeof (GstBaseSink), 408}, - {"GstBaseSinkClass", sizeof (GstBaseSinkClass), 368}, - {"GstBaseSrc", sizeof (GstBaseSrc), 392}, - {"GstBaseSrcClass", sizeof (GstBaseSrcClass), 376}, - {"GstBaseTransform", sizeof (GstBaseTransform), 368}, - {"GstBaseTransformClass", sizeof (GstBaseTransformClass), 376}, - {"GstCollectData", sizeof (GstCollectData), 120}, - {"GstCollectPads", sizeof (GstCollectPads), 92}, - {"GstCollectPadsClass", sizeof (GstCollectPadsClass), 136}, - {"GstPushSrc", sizeof (GstPushSrc), 408}, - {"GstPushSrcClass", sizeof (GstPushSrcClass), 396}, - {"GstTimedValue", sizeof (GstTimedValue), 32}, - {"GstValueArray", sizeof (GstValueArray), 24}, - {"GstController", sizeof (GstController), 40}, - {"GstControllerClass", sizeof (GstControllerClass), 84}, - {"GstNetClientClock", sizeof (GstNetClientClock), 256}, - {"GstNetClientClockClass", sizeof (GstNetClientClockClass), 192}, - {"GstNetTimePacket", sizeof (GstNetTimePacket), 16}, - {"GstNetTimeProvider", sizeof (GstNetTimeProvider), 84}, - {"GstNetTimeProviderClass", sizeof (GstNetTimeProviderClass), 120}, + {"GstAdapter", sizeof (GstAdapter), 88} + , + {"GstAdapterClass", sizeof (GstAdapterClass), 168} + , + {"GstBaseSink", sizeof (GstBaseSink), 600} + , + {"GstBaseSinkClass", sizeof (GstBaseSinkClass), 728} + , + {"GstBaseSrc", sizeof (GstBaseSrc), 600} + , + {"GstBaseSrcClass", sizeof (GstBaseSrcClass), 744} + , + {"GstBaseTransform", sizeof (GstBaseTransform), 576} + , + {"GstBaseTransformClass", sizeof (GstBaseTransformClass), 744} + , + {"GstCollectData", sizeof (GstCollectData), 168} + , + {"GstCollectPads", sizeof (GstCollectPads), 168} + , + {"GstCollectPadsClass", sizeof (GstCollectPadsClass), 272} + , + {"GstPushSrc", sizeof (GstPushSrc), 632} + , + {"GstPushSrcClass", sizeof (GstPushSrcClass), 784} + , + {"GstTimedValue", sizeof (GstTimedValue), 32} + , + {"GstValueArray", sizeof (GstValueArray), 32} + , + {"GstController", sizeof (GstController), 80} + , + {"GstControllerClass", sizeof (GstControllerClass), 168} + , + {"GstNetClientClock", sizeof (GstNetClientClock), 368} + , + {"GstNetClientClockClass", sizeof (GstNetClientClockClass), 384} + , + {"GstNetTimePacket", sizeof (GstNetTimePacket), 16} + , + {"GstNetTimeProvider", sizeof (GstNetTimeProvider), 152} + , + {"GstNetTimeProviderClass", sizeof (GstNetTimeProviderClass), 240} + , {NULL, 0, 0} }; -- 2.7.4