apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gisle Vanem" <g...@bgnett.no>
Subject Inline problems on MingW
Date Thu, 26 Aug 2004 21:58:59 GMT
Has anybody attempted building APR using MingW? The win32 portion
of the headers seems rather MSVC centric. I don't know if it's supposed
to works since I found no reference to MingW on apache.org or in the docs.

Anyway, in include\arch\win32\apr_arch_atime.h:

__inline void FileTimeToAprTime(apr_time_t *result, FILETIME *input)
{
    /* Convert FILETIME one 64 bit number so we can work with it. */
    *result = input->dwHighDateTime;

Gave heaps of duplicate errors when linking the test programs.
I assume it's because MSVC and gcc have different handling of 
inline and __inline. g++ is more like MSVC I believe. I tried to fix it 
in apr.hw:

#if defined(__GNUC__)
#define APR_INLINE extern __inline__ /* expanded on -O2 or above */
#else
#define APR_INLINE __inline
#endif

Which gave new error when some .c-files had thing like
static APR_INLINE void ..

(double modifiers). Would it be okay to replace the above with simply 
__inline? Or do we need a new "#define APR_INLINE_PRIVATE __inline"
or something?

--gv



Mime
View raw message