apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Mark Vandenberg <jay...@gmail.com>
Subject [patch 13/17] APR_INLINE
Date Sat, 15 Apr 2006 01:41:31 GMT
Define APR_INLINE on MinGW to be static __inline__, and use
APR_INLINE consistently throughout.

This patch has only been tested with ./configure CFLAGS=" -O0 "

Index: include/apr.h.in
===================================================================
--- include/apr.h.in.orig
+++ include/apr.h.in
@@ -62,7 +62,11 @@
 #define APR_INLINE
 #define APR_HAS_INLINE		0
 #else
+#ifdef __MINGW32__
+#define APR_INLINE static __inline__
+#else
 #define APR_INLINE __inline__
+#endif
 #define APR_HAS_INLINE		1
 #endif
 
Index: include/arch/win32/apr_arch_atime.h
===================================================================
--- include/arch/win32/apr_arch_atime.h.orig
+++ include/arch/win32/apr_arch_atime.h
@@ -36,7 +36,7 @@ struct atime_t {
 #define APR_DELTA_EPOCH_IN_USEC   APR_TIME_C(11644473600000000);
 
 
-__inline void FileTimeToAprTime(apr_time_t *result, FILETIME *input)
+APR_INLINE void FileTimeToAprTime(apr_time_t *result, FILETIME *input)
 {
     /* Convert FILETIME one 64 bit number so we can work with it. */
     *result = input->dwHighDateTime;
@@ -48,7 +48,7 @@ __inline void FileTimeToAprTime(apr_time
 }
 
 
-__inline void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)
+APR_INLINE void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)
 {
     LONGLONG ll;
     t += APR_DELTA_EPOCH_IN_USEC;
Index: include/arch/win32/apr_arch_misc.h
===================================================================
--- include/arch/win32/apr_arch_misc.h.orig
+++ include/arch/win32/apr_arch_misc.h
@@ -155,7 +155,7 @@ FARPROC apr_load_dll_func(apr_dlltoken_e
 #define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
     typedef rettype (calltype *apr_winapi_fpt_##fn) args; \
     static apr_winapi_fpt_##fn apr_winapi_pfn_##fn = NULL; \
-    __inline rettype apr_winapi_##fn args \
+    APR_INLINE rettype apr_winapi_##fn args \
     {   if (!apr_winapi_pfn_##fn) \
             apr_winapi_pfn_##fn = (apr_winapi_fpt_##fn) \
                                       apr_load_dll_func(lib, #fn, ord); \

--

Mime
View raw message