Author: wrowe Date: Wed Jan 5 12:15:26 2005 New Revision: 124265 URL: http://svn.apache.org/viewcvs?view=rev&rev=124265 Log:
Begin explicit __cdecl protection against including the apr headers from any c sources compiled /Gz (default __stdcall convention). Observed and suggested by Andre Pang <ozone algorithm.com.au>. Modified: apr/apr-util/trunk/include/apu.hw Modified: apr/apr-util/trunk/include/apu.hw Url: http://svn.apache.org/viewcvs/apr/apr-util/trunk/include/apu.hw?view=diff&rev=124265&p1=apr/apr-util/trunk/include/apu.hw&r1=124264&p2=apr/apr-util/trunk/include/apu.hw&r2=124265 ============================================================================== --- apr/apr-util/trunk/include/apu.hw (original) +++ apr/apr-util/trunk/include/apu.hw Wed Jan 5 12:15:26 2005 @@ -43,7 +43,7 @@ * conventions at compile time. */ -#if !defined(WIN32) +#if defined(DOXYGEN) || !defined(WIN32) /** * The public APR-UTIL functions are declared with APU_DECLARE(), so they may * use the most appropriate calling convention. Public APR functions with @@ -70,33 +70,15 @@ #define APU_DECLARE_DATA #elif defined(APU_DECLARE_STATIC) #define APU_DECLARE(type) type __stdcall -#define APU_DECLARE_NONSTD(type) type +#define APU_DECLARE_NONSTD(type) type __cdecl #define APU_DECLARE_DATA #elif defined(APU_DECLARE_EXPORT) #define APU_DECLARE(type) __declspec(dllexport) type __stdcall -#define APU_DECLARE_NONSTD(type) __declspec(dllexport) type +#define APU_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl #define APU_DECLARE_DATA __declspec(dllexport) #else -/** - * The public APR-UTIL functions are declared with APU_DECLARE(), so they may - * use the most appropriate calling convention. Public APR functions with - * variable arguments must use APU_DECLARE_NONSTD(). - * - */ #define APU_DECLARE(type) __declspec(dllimport) type __stdcall -/** - * The public APR-UTIL functions using variable arguments are declared with - * APU_DECLARE_NONSTD(), as they must use the C language calling convention. - * - */ -#define APU_DECLARE_NONSTD(type) __declspec(dllimport) type -/** - * The public APR-UTIL variables are declared with APU_DECLARE_DATA. - * This assures the appropriate indirection is invoked at compile time. - * - * @remark extern APU_DECLARE_DATA type apr_variable; syntax is required for - * declarations within headers to properly import the variable. - */ +#define APU_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl #define APU_DECLARE_DATA __declspec(dllimport) #endif /** @} */
