Interesting. Thanks for the patch.

Samisa...

Sanjaya Ratnaweera wrote:

Hi,
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.

Thanks
Sanjaya

------------------------------------------------------------------------

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 */


Reply via email to