commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r835000 - in /commons/sandbox/runtime/trunk/src/main/native/include: acr.h acr_private.h
Date Wed, 11 Nov 2009 18:18:45 GMT
Author: mturk
Date: Wed Nov 11 18:18:45 2009
New Revision: 835000

URL: http://svn.apache.org/viewvc?rev=835000&view=rev
Log:
Use intptr types

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr.h
    commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr.h?rev=835000&r1=834999&r2=835000&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr.h Wed Nov 11 18:18:45 2009
@@ -242,7 +242,7 @@
 #else
 typedef  unsigned int       acr_uint32_t;
 #endif
-typedef  unsigned long      apr_ino_t;
+typedef  unsigned long      acr_ino_t;
 typedef  size_t             acr_size_t;
 typedef  jchar              acr_wchar_t;
 typedef  jint               acr_int_t;
@@ -267,6 +267,25 @@
 typedef  PSID               acr_uid_t;
 typedef  PSID               acr_gid_t;
 typedef  HANDLE             acr_osd_t;
+#if HAVE_INTPTR_T
+typedef  intptr_t           acr_intptr_t;
+#else
+#ifdef _WIN64
+typedef  __int64            acr_intptr_t;
+#else
+typedef  int                acr_intptr_t;
+#endif
+#endif
+#if HAVE_UINTPTR_T
+typedef  uintptr_t          acr_uintptr_t;
+#else
+#ifdef _WIN64
+typedef  unsigned __int64   acr_uintptr_t;
+#else
+typedef  unsigned           acr_uintptr_t;
+#endif
+#endif
+
 #define ACR_INT64_C(val)   (val##I64)
 #define ACR_UINT64_C(val)  (val##UI64)
 #define ACR_PPATH_MAX       8192
@@ -281,7 +300,6 @@
 typedef  long long          acr_int64_t;
 #endif
 #endif
-
 #if HAVE_UINT64_T
 typedef  uint64_t           acr_uint64_t;
 #else
@@ -298,6 +316,16 @@
 #else
 typedef  acr_int64_t        acr_off_t;
 #endif
+#if HAVE_INTPTR_T
+typedef  intptr_t           acr_intptr_t;
+#else
+typedef  long               acr_intptr_t;
+#endif
+#if HAVE_UINTPTR_T
+typedef  uintptr_t          acr_uintptr_t;
+#else
+typedef  unsigned long      acr_uintptr_t;
+#endif
 typedef  socklen_t          acr_socklen_t;
 /* API char type on POSIX is always char (UTF-8) */
 typedef  char               acr_pchar_t;

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h?rev=835000&r1=834999&r2=835000&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h Wed Nov 11 18:18:45
2009
@@ -263,7 +263,7 @@
 #define ACR_IFO_LLDOWN        7
 
 /* Misc macros */
-#define LLT(X)                  ((acr_ssize_t)(X))
+#define LLT(X)                  ((acr_intptr_t)(X))
 #define UNREFERENCED(P)         (P) = (P)
 #define UNREFERENCED_STDARGS    _E = _E; _O = _O
 #define UNREFERENCED_O          _O = _O
@@ -288,9 +288,9 @@
 
 /* Integer to void* casting
  */
-#define I2V(I)                  ((void *)(ptrdiff_t)(I))
-#define V2I(P)                  ((int)(ptrdiff_t)(P))
-#define V2U(P)                  ((unsigned int)(ptrdiff_t)(P))
+#define I2V(I)                  ((void *)(acr_intptr_t)(I))
+#define V2I(P)                  ((int)(acr_intptr_t)(P))
+#define V2U(P)                  ((unsigned int)(acr_uintptr_t)(P))
 
 #define IS_JOBJECT_NULL(E, O)  \
         (!(O) || ((*(E))->IsSameObject((E), (O), NULL) == JNI_TRUE))



Mime
View raw message