Author: mturk
Date: Thu Apr 23 14:23:04 2009
New Revision: 767929
URL: http://svn.apache.org/viewvc?rev=767929&view=rev
Log:
Add ABS_MAX_PATH
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Platform.java
commons/sandbox/runtime/trunk/src/main/native/os/darwin/platform.c
commons/sandbox/runtime/trunk/src/main/native/os/hpux/platform.c
commons/sandbox/runtime/trunk/src/main/native/os/linux/platform.c
commons/sandbox/runtime/trunk/src/main/native/os/solaris/platform.c
commons/sandbox/runtime/trunk/src/main/native/os/win32/platform.c
commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestOS.java
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Platform.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Platform.java?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Platform.java
(original)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Platform.java
Thu Apr 23 14:23:04 2009
@@ -31,7 +31,6 @@
/*
* Get Platform integer property value.
- * @see APR_PLAT_* in acr_platform.h file.
*/
private static native int[] intProp();
@@ -44,6 +43,8 @@
SIZEOF_WCHAR = i[4];
DATA_MODEL = i[5];
MAX_PATH = i[6];
+ ABS_MAX_PATH = i[7];
+
}
/**
@@ -79,7 +80,14 @@
/**
* Maximum {...@code file} path length this platfrom supports.
+ * On some platforms like {...@code Microsoft Windows} this
+ * is maximum length of each {...@code path} elements.
*/
public static final int MAX_PATH;
+ /**
+ * Absolute maximum {...@code file} path length this platfrom supports.
+ */
+ public static final int ABS_MAX_PATH;
+
}
Modified: commons/sandbox/runtime/trunk/src/main/native/os/darwin/platform.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/darwin/platform.c?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/darwin/platform.c
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/darwin/platform.c Thu Apr
23 14:23:04 2009
@@ -26,6 +26,7 @@
{
jintArray ra;
int ia[32];
+
UNREFERENCED_O;
ia[0] = sizeof(int);
@@ -39,6 +40,7 @@
ia[5] = 32;
#endif
ia[6] = PATH_MAX;
+ ia[7] = PATH_MAX;
ra = (*_E)->NewIntArray(_E, 32);
if (ra) {
Modified: commons/sandbox/runtime/trunk/src/main/native/os/hpux/platform.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/hpux/platform.c?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/hpux/platform.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/hpux/platform.c Thu Apr 23
14:23:04 2009
@@ -26,6 +26,7 @@
{
jintArray ra;
int ia[32];
+
UNREFERENCED_O;
ia[0] = sizeof(int);
@@ -39,6 +40,7 @@
ia[5] = 32;
#endif
ia[6] = PATH_MAX;
+ ia[7] = PATH_MAX;
ra = (*_E)->NewIntArray(_E, 32);
if (ra) {
Modified: commons/sandbox/runtime/trunk/src/main/native/os/linux/platform.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/linux/platform.c?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/platform.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/linux/platform.c Thu Apr
23 14:23:04 2009
@@ -26,6 +26,7 @@
{
jintArray ra;
int ia[32];
+
UNREFERENCED_O;
ia[0] = sizeof(int);
@@ -39,6 +40,7 @@
ia[5] = 32;
#endif
ia[6] = PATH_MAX;
+ ia[7] = PATH_MAX;
ra = (*_E)->NewIntArray(_E, 32);
if (ra) {
Modified: commons/sandbox/runtime/trunk/src/main/native/os/solaris/platform.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/solaris/platform.c?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/solaris/platform.c
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/solaris/platform.c Thu Apr
23 14:23:04 2009
@@ -26,6 +26,7 @@
{
jintArray ra;
int ia[32];
+
UNREFERENCED_O;
ia[0] = sizeof(int);
@@ -39,6 +40,7 @@
ia[5] = 32;
#endif
ia[6] = PATH_MAX;
+ ia[7] = PATH_MAX;
ra = (*_E)->NewIntArray(_E, 32);
if (ra) {
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/platform.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/platform.c?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/platform.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/platform.c Thu Apr
23 14:23:04 2009
@@ -39,6 +39,7 @@
ia[5] = 32;
#endif
ia[6] = 248;
+ ia[7] = 32760;
ra = (*_E)->NewIntArray(_E, 32);
if (ra) {
Modified:
commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestOS.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestOS.java?rev=767929&r1=767928&r2=767929&view=diff
==============================================================================
---
commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestOS.java
(original)
+++
commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestOS.java
Thu Apr 23 14:23:04 2009
@@ -76,6 +76,7 @@
System.out.println("Platform:");
System.out.println("Int size " + Platform.SIZEOF_INT);
System.out.println("Max path " + Platform.MAX_PATH);
+ System.out.println("Abs path " + Platform.ABS_MAX_PATH);
}