harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r722442 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni: shared/OSMemory.c shared/OSMemory.h unix/OSMemory.c unix/OSMemory.h unix/makefile windows/OSMemory.c windows/OSMemory.h windows/OSMemoryWin32.c windows/makefile
Date Tue, 02 Dec 2008 12:47:36 GMT
Author: tellison
Date: Tue Dec  2 04:47:35 2008
New Revision: 722442

URL: http://svn.apache.org/viewvc?rev=722442&view=rev
Log:
Apply patch for HARMONY-6030 ([classlib][luni] - move platform independent code of OSMemory
to shared directory)


Added:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c  
(contents, props changed)
      - copied, changed from r722137, harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h  
(props changed)
      - copied unchanged from r722137, harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.h
Removed:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemory.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemory.h
Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemoryWin32.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
(from r722137, harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c?p2=harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c&p1=harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c&r1=722137&r2=722442&rev=722442&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c Tue
Dec  2 04:47:35 2008
@@ -19,10 +19,6 @@
  * Common natives supporting the memory system interface.
  */
 
-#if defined(MACOSX)
-#include <sys/types.h>
-#endif
-#include <sys/mman.h>
 #include <string.h>
 #include "vmi.h"
 #include "OSMemory.h"

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.h
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile?rev=722442&r1=722441&r2=722442&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/makefile Tue Dec
 2 04:47:35 2008
@@ -35,7 +35,7 @@
 	$(SHAREDSUB)osc.o $(SHAREDSUB)socket.o $(SHAREDSUB)inetadds.o \
 	$(SHAREDSUB)filedesc.o $(SHAREDSUB)timezone.o \
 	$(SHAREDSUB)OSFileSystem.o OSFileSystemLinux32.o \
-	OSMemory.o OSMemoryLinux32.o $(SHAREDSUB)OSNetworkSystem.o \
+	$(SHAREDSUB)OSMemory.o OSMemoryLinux32.o $(SHAREDSUB)OSNetworkSystem.o \
 	OSNetworkSystemLinux.o $(HY_OS)/OSResourcesMonitor.o hyenv.o 
 
 ifneq ($(HY_ZIP_API),true)

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemoryWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemoryWin32.c?rev=722442&r1=722441&r2=722442&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemoryWin32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSMemoryWin32.c
Tue Dec  2 04:47:35 2008
@@ -157,3 +157,21 @@
   
   return (jlong) mapAddress;
 }
+
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSMemory_getCharArray
+  (JNIEnv * env, jobject thiz, jlong address, jcharArray jdest, jint offset, jint length)
+{
+  jboolean isCopy;
+  jchar *dest = (*env)->GetCharArrayElements (env, jdest, &isCopy);
+  memcpy (dest + offset, (const void *) address, (size_t) length);
+  (*env)->ReleaseCharArrayElements (env, jdest, dest, 0);
+}
+
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSMemory_setCharArray
+  (JNIEnv * env, jobject thiz, jlong address, jcharArray jsrc, jint offset, jint length)
+{
+  jboolean isCopy;
+  jchar *src = (*env)->GetCharArrayElements (env, jsrc, &isCopy);
+  memcpy ((void *) address, (const jchar *) src + offset, (size_t) length);
+  (*env)->ReleaseCharArrayElements (env, jsrc, src, JNI_ABORT);
+}

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile?rev=722442&r1=722441&r2=722442&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile Tue
Dec  2 04:47:35 2008
@@ -35,7 +35,7 @@
   $(SHAREDSUB)socket.obj $(SHAREDSUB)inetadds.obj \
   $(SHAREDSUB)filedesc.obj $(SHAREDSUB)timezone.obj \
   OSFileSystemWin32.obj hyenv.obj\
-  $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj OSMemory.obj \
+  $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj $(SHAREDSUB)OSMemory.obj \
   $(SHAREDSUB)OSNetworkSystem.obj OSNetworkSystemWin32.obj \
   OSResourcesMonitorWin32.obj
 



Mime
View raw message