You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@yahoo.com> on 2004/06/04 07:23:21 UTC

AXISCALL problem

Hi All,

In GDefine.h AXISCALL is defined as follows:

#if defined(__GNUC__)
#define AXISCALL __attribute__((stdcall))
#else
#define AXISCALL __stdcall
#endif

However on Redhat Advanced Server stdcall calling convention gives compilation problems.

if I change it to 
#define AXISCALL __attribute__((cdecl))
it works.

Is there any perticular reason to use 'stdcall'? 
I tried 'cdecl' with other linux platforms apart from RH AS and it seem to work.

Will there be any problems if I change 
#define AXISCALL __attribute__((stdcall))
to
#define AXISCALL __attribute__((cdecl))
in cvs code?
(this will minimize trouble when switching platforms)

Thanks,
Samisa...


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

RE: AXISCALL problem

Posted by Susantha Kumara <su...@opensource.lk>.
Hi Samisa,

> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> Sent: Friday, June 04, 2004 11:23 AM
> To: Apache AXIS C Developers List
> Subject: AXISCALL problem
> 
> Hi All,
> 
> In GDefine.h AXISCALL is defined as follows:
> 
> #if defined(__GNUC__)
> #define AXISCALL __attribute__((stdcall))
> #else
> #define AXISCALL __stdcall
> #endif
> 
> However on Redhat Advanced Server stdcall calling convention gives
> compilation problems.
> 
> if I change it to
> #define AXISCALL __attribute__((cdecl))
> it works.
> 
> Is there any perticular reason to use 'stdcall'?

No. we can use either stdcall or cdecl. But you have to make sure that
all use the same calling convention. For an example if you build
AxisServer with AXISCALL = stdcall and you deploy a web service compiled
with AXISCALL = cdecl, either there will be a runtime exception or stack
overflow after a while.

For client side if your stub is compiled with AXISCALL = stdcall your
AxisClient library should also have been built using AXISCALL = stdcall.


---
Susantha. 

> I tried 'cdecl' with other linux platforms apart from RH AS and it
seem to
> work.
> 
> Will there be any problems if I change
> #define AXISCALL __attribute__((stdcall))
> to
> #define AXISCALL __attribute__((cdecl))
> in cvs code?
> (this will minimize trouble when switching platforms)
> 
> Thanks,
> Samisa...
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/