You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Sanjaya <sa...@wso2.com> on 2005/12/10 11:55:04 UTC
[Axis2] [Patch] Compiling Axis2 on powerpc
When compiling axis2 on powerpc, gcc 4.0 produces the following warning
message all over the place.
"warning: 'cdecl' attribute directive ignored".
In include/axis2_defines.h 'cdecl' calling convention is defined for
"_GNUC_" pladform, hence for all architectres. But it seems it's only
needed for "_GNUC_" on "__i386".
For an example here is an extract from expat_external.h in expat library.
#ifndef XMLCALL
#if defined(XML_USE_MSC_EXTENSIONS)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386)
#define XMLCALL __attribute__((cdecl))
#else
#define XMLCALL
#endif
#endif
The attached patch does something similar for axis2 and stops the
warning. Please apply.
Re: [Axis2] [Patch] Compiling Axis2 on powerpc
Posted by Sanjaya Ratnaweera <sa...@wso2.com>.
Sorry, this was supposed to be sent to the C list and sent to this list
by mistake, so please ignore
Sanjaya
Sanjaya wrote:
> When compiling axis2 on powerpc, gcc 4.0 produces the following
> warning message all over the place.
> "warning: 'cdecl' attribute directive ignored".
>
> In include/axis2_defines.h 'cdecl' calling convention is defined for
> "_GNUC_" pladform, hence for all architectres. But it seems it's only
> needed for "_GNUC_" on "__i386".
>
> For an example here is an extract from expat_external.h in expat library.
>
> #ifndef XMLCALL
> #if defined(XML_USE_MSC_EXTENSIONS)
> #define XMLCALL __cdecl
> #elif defined(__GNUC__) && defined(__i386)
> #define XMLCALL __attribute__((cdecl))
> #else
> #define XMLCALL
> #endif
> #endif
> The attached patch does something similar for axis2 and stops the
> warning. Please apply.
>
>------------------------------------------------------------------------
>
>Index: axis2_defines.h
>===================================================================
>--- axis2_defines.h (revision 354959)
>+++ axis2_defines.h (working copy)
>@@ -55,15 +55,18 @@
> * Calling Conventions
> */
> #if defined(__GNUC__)
>+#if defined(__i386)
> #define AXIS2_CALL __attribute__((cdecl))
> #else
>+#define AXIS2_CALL
>+#endif
>+#else
> #if defined(__unix)
> #define AXIS2_CALL
> #else /* WIN32 */
> #define AXIS2_CALL __stdcall
> #endif
> #endif
>-
> #ifdef DOXYGEN
> /* define these just so doxygen documents them */
>
>
>
--
http://sanjaya.8k.com