You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/06 19:15:16 UTC

svn commit: r801732 - in /commons/sandbox/runtime/trunk/src/main/native/include/arch/windows: acr_arch.h acr_arch_private.h

Author: mturk
Date: Thu Aug  6 17:15:15 2009
New Revision: 801732

URL: http://svn.apache.org/viewvc?rev=801732&view=rev
Log:
Move inline define to arch_private

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h?rev=801732&r1=801731&r2=801732&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch.h Thu Aug  6 17:15:15 2009
@@ -263,6 +263,8 @@
 extern "C" {
 #endif
 
+#define ACR_INLINE                __inline
+
 /*
  * ---------------------------------------------------------------------
  * begin of POSIX utilities
@@ -303,11 +305,13 @@
 static ACR_INLINE void FileTimeToAprTime(acr_time_t *result, FILETIME *input)
 {
     /* Convert FILETIME one 64 bit number so we can work with it. */
-    *result = input->dwHighDateTime;
-    *result = (*result) << 32;
+    *result  = input->dwHighDateTime;
+    *result  = (*result) << 32;
     *result |= input->dwLowDateTime;
-    *result /= 10;    /* Convert from 100 nano-sec periods to micro-seconds. */
-    *result -= ACR_DELTA_EPOCH_IN_USEC;  /* Convert from Windows epoch to Unix epoch */
+    /* Convert from 100 nano-sec periods to micro-seconds. */
+    *result /= 10;
+    /* Convert from Windows epoch to Unix epoch */
+    *result -= ACR_DELTA_EPOCH_IN_USEC;
     return;
 }
 
@@ -315,13 +319,14 @@
 static ACR_INLINE void AprTimeToFileTime(LPFILETIME pft, acr_time_t t)
 {
     LONGLONG ll;
-    t += ACR_DELTA_EPOCH_IN_USEC;
-    ll = t * 10;
-    pft->dwLowDateTime = (DWORD)ll;
-    pft->dwHighDateTime = (DWORD) (ll >> 32);
+
+    ll = (t + ACR_DELTA_EPOCH_IN_USEC) * 10;
+    pft->dwLowDateTime  = (DWORD)(ll);
+    pft->dwHighDateTime = (DWORD)(ll >> 32);
     return;
 }
 
+
 /*
  * ---------------------------------------------------------------------
  * end   of POSIX utilities
@@ -331,7 +336,6 @@
 #if !defined(WSA_NOT_ENOUGHT_MEMORY)
 #define WSA_NOT_ENOUGHT_MEMORY      8
 #endif
-#define ACR_INLINE                __inline
 #define LOG_MSG_DOMAIN            "ApacheCommonsRuntime"
 
 typedef enum {

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h?rev=801732&r1=801731&r2=801732&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h Thu Aug  6 17:15:15 2009
@@ -48,6 +48,8 @@
 extern "C" {
 #endif
 
+#define ACR_INLINE __inline
+
 /**
  * @file acr_arch_private.h
  * @brief