harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r451118 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni: linux/ shared/
Date Fri, 29 Sep 2006 04:58:47 GMT
Author: pyang
Date: Thu Sep 28 21:58:45 2006
New Revision: 451118

URL: http://svn.apache.org/viewvc?view=rev&rev=451118
Log:
Apply patch for HARMONY-1615([classlib][luni]Open warning options for linux in native codes
of native/luni directory)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSNetworkSystemLinux.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/helpers.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/hyenv.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/makefile
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/procimpl.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/bigint.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/dblparse.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/fltparse.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.h
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/process.c
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/socket.c

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSFileSystemLinux32.c
Thu Sep 28 21:58:45 2006
@@ -225,7 +225,6 @@
 JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSFileSystem_transferImpl
   (JNIEnv *env, jobject thiz, jlong fd, jobject sd, jlong offset, jlong count)
 {
-  PORT_ACCESS_FROM_ENV (env);
   OSSOCKET socket;
   //TODO IPV6
   hysocket_t hysocketP =

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSMemoryLinux32.c
Thu Sep 28 21:58:45 2006
@@ -85,7 +85,7 @@
 	  size   += align_offset;
 	  page_count = (size+PAGE_SIZE-1)/PAGE_SIZE;
 	  vec = (char *) hymem_allocate_memory(page_count*sizeof(char));
-	  if(mincore((void *)m_addr, size , vec)==0) //or else there is error about the mincore
and return false;
+	  if(mincore((void *)m_addr, size , (unsigned char *)vec)==0) //or else there is error about
the mincore and return false;
 	  {
 	  	  int i;
 		  for(i=0 ;i<page_count;i++)
@@ -122,7 +122,7 @@
 JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSMemory_mmapImpl
   (JNIEnv * env, jobject thiz, jlong fd, jlong alignment, jlong size, jint mmode)
 {
-  PORT_ACCESS_FROM_ENV (env);
+  //PORT_ACCESS_FROM_ENV (env);
   void *mapAddress = NULL;
   int prot, flags;
 		  

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSNetworkSystemLinux.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSNetworkSystemLinux.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/OSNetworkSystemLinux.c
Thu Sep 28 21:58:45 2006
@@ -60,10 +60,9 @@
   struct sockaddr_in dest,source,local;
   struct icmp * send_buf = 0;
   struct ip * recv_buf = 0;
-  int size = sizeof(struct icmp);
   int result,ret=UNREACHABLE;
   struct timeval timeP;
-  fd_set * fdset_read;
+  fd_set * fdset_read = NULL;
   int sockadd_size = sizeof (source);
   jbyte host[HYSOCK_INADDR6_LEN];
   U_32 length =  (*env)->GetArrayLength (env,address);
@@ -120,7 +119,7 @@
   }  
   result = recvfrom(sock, (char*)recv_buf,
             PACKET_SIZE, 0,
-            (struct sockaddr*)&source, &sockadd_size);
+            (struct sockaddr*)&source, (unsigned int *)&sockadd_size);
 
   if (SOCKET_ERROR == result){
   	goto cleanup;
@@ -267,25 +266,22 @@
 
 JNIEXPORT jobject JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_inheritedChannelImpl
   (JNIEnv * env , jobject clz){
-  	PORT_ACCESS_FROM_ENV (env);
-        int socket = 0;
-        int opt;
-	int length = sizeof(opt);
-        int socket_type;
-        struct sockaddr_in local_addr;
-        struct sockaddr_in remote_addr;
-        jclass channel_class,fd_class, addr_class, socketaddr_class,serverSocket_class,socketImpl_class;
-        jobject channel_object, socketaddr_object, addr_object,localAddr_object, serverSocket_object,socketImpl_object;
-	jfieldID port_field, addr_field, socketaddr_field,addrarray_field, localAddr_field, bound_field;
+    int socket = 0;
+    int opt;
+    int length = sizeof(opt);
+    int socket_type;
+    struct sockaddr_in local_addr;
+    struct sockaddr_in remote_addr;
+    jclass channel_class, socketaddr_class,serverSocket_class,socketImpl_class;
+    jobject channel_object = NULL, socketaddr_object, serverSocket_object,socketImpl_object;
+	jfieldID port_field, socketaddr_field, bound_field;
 	jfieldID serverSocket_field,socketImpl_field;
-	jmethodID addr_new,channel_new;
 	hysocket_t sock;
 	jbyte * address;
 	jbyte * localAddr;
-        jbyteArray addr_array;
 	jboolean jtrue = TRUE;
 
-	if(0 != getsockopt(socket,SOL_SOCKET,SO_TYPE,&opt,&length)){
+	if(0 != getsockopt(socket,SOL_SOCKET,SO_TYPE,&opt,(unsigned int *)&length)){
 		return NULL;
 	}
 	if(SOCK_STREAM !=opt && SOCK_DGRAM !=opt){
@@ -294,7 +290,7 @@
 	socket_type = opt;
 
 	length  = sizeof(struct sockaddr);
-	if(0 != getsockname(socket,(struct sockaddr *)&local_addr,&length)){
+	if(0 != getsockname(socket,(struct sockaddr *)&local_addr,(unsigned int *)&length)){
 		return NULL;
 	} else {
 		if(AF_INET != local_addr.sin_family || length != sizeof(struct sockaddr)){
@@ -306,7 +302,7 @@
 		}
 		memcpy (localAddr, &(local_addr.sin_addr.s_addr), 4); 
 	}
-	if(0 != getpeername(socket,(struct sockaddr *)&remote_addr,&length))	{
+	if(0 != getpeername(socket,(struct sockaddr *)&remote_addr,(unsigned int *)&length))
{
 		remote_addr.sin_port = 0;
                 remote_addr.sin_addr.s_addr = 0;
 		address = malloc(sizeof(jbyte)*4);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/helpers.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/helpers.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/helpers.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/helpers.c
Thu Sep 28 21:58:45 2006
@@ -80,7 +80,6 @@
 setPlatformLastModified (JNIEnv * env, char *path, I_64 time)
 {
 
-  PORT_ACCESS_FROM_ENV (env);
   struct stat statbuf;
   struct utimbuf timebuf;
   if (stat (path, &statbuf))

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/hyenv.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/hyenv.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/hyenv.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/hyenv.c
Thu Sep 28 21:58:45 2006
@@ -21,7 +21,6 @@
 JNIEXPORT jbyteArray JNICALL Java_org_apache_harmony_luni_platform_Environment_getEnvBytes
   (JNIEnv *env, jclass obj){
   extern char** environ;
-  char* var;  
   jbyteArray byteArray;
   int bufsize=0,i=0,start=0,len=0;
   for(i=0;*(environ+i);i++){
@@ -30,7 +29,7 @@
   byteArray = (*env)->NewByteArray(env,bufsize);
   for(i=0;*(environ+i);i++){
       len=strlen(environ[i])+1;
-      (*env)->SetByteArrayRegion(env,byteArray, start, len, environ[i]);
+      (*env)->SetByteArrayRegion(env,byteArray, start, len, (jbyte *)environ[i]);
       start+=len;
   }
   return byteArray;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/makefile
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/makefile?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/makefile
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/makefile
Thu Sep 28 21:58:45 2006
@@ -18,7 +18,7 @@
 
 include $(HY_HDK)/build/make/makefile.include
 
-CFLAGS += -fpic
+CFLAGS += -fpic -Wall -Werror 
 
 BUILDFILES = \
 	$(SHAREDSUB)luni_copyright.o $(SHAREDSUB)file.o procimpl.o \

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/procimpl.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/procimpl.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/procimpl.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/linux/procimpl.c
Thu Sep 28 21:58:45 2006
@@ -156,7 +156,7 @@
 		if (error == ENOMEM) {
 		    result = 1001;
 		}
-		else if (error = EAGAIN) { 
+		else if (error == EAGAIN) { 
 		    result = 1002;
 		}
 	
@@ -195,10 +195,6 @@
   else
     {
       /* in the child-thread (not the grand-child) */
-      int stat_val = -1;
-      jfieldID hid;
-      jmethodID mid;
-      jclass rcvClass;
       char dummy;
       int avail = 0;
       int noDataInThePipe;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
Thu Sep 28 21:58:45 2006
@@ -232,7 +232,7 @@
 
       length = (*env)->GetArrayLength (env, path);
       length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-      ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+      ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
       pathCopy[length] = '\0';
       ioh_convertToPlatform (pathCopy);
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
Thu Sep 28 21:58:45 2006
@@ -267,7 +267,7 @@
   hysock_sockaddr_address6 (sockaddrP, nipAddress, &length, &scope_id);	
   nPort	= hysock_sockaddr_port (sockaddrP);
   anInetAddress	=
-    newJavaNetInetAddressGenericB (env,	nipAddress, length, scope_id);
+    newJavaNetInetAddressGenericB (env,	(jbyte *)nipAddress, length, scope_id);
 
   setJavaIoFileDescriptorContents (env,	fileDescriptorSocketImpl,
 	      socketNew);
@@ -275,7 +275,7 @@
   setSocketImplPort (env, socketImpl, hysock_ntohs (nPort));
 }
 
-/*----------------------former cache get/set ------------------------------------
+/*----------------------former cache get/set ------------------------------------*/
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
  * Method:    oneTimeInitializationDatagram
@@ -421,14 +421,14 @@
     }
   else
     {
-      message =	internalBuffer;	
+      message =	(jbyte *)internalBuffer;	
     }
 
 
   result = hysock_read (hysocketP, (U_8 *) message, localCount, HYSOCK_NOFLAGS);
 
   if (result > 0)
-    (*env)->SetByteArrayRegion (env, data, offset, result, (U_8 *)message);
+    (*env)->SetByteArrayRegion (env, data, offset, result, (jbyte *)message);
 
   if (((U_8 *)message) != internalBuffer)
     {
@@ -482,7 +482,7 @@
     }
   else
     {
-      message =	internalBuffer;	
+      message =	(jbyte *)internalBuffer;	
     }
 
 
@@ -588,7 +588,7 @@
     }
   else
     {
-      netGetJavaNetInetAddressValue (env, inetAddress, nAddrBytes, &length);
+      netGetJavaNetInetAddressValue (env, inetAddress, (U_8 *)nAddrBytes, (U_32 *)&length);
 
       nPort = hysock_htons ((U_16) remotePort);	
       if (length == HYSOCK_INADDR_LEN)
@@ -657,7 +657,7 @@
       //length = (*env)->GetArrayLength	(env, byte_array);
       //(*env)->GetByteArrayRegion (env, byte_array, 0,	length,	nAddrBytes);
       */
-      netGetJavaNetInetAddressValue (env, inetAddr, nAddrBytes,	&length);
+      netGetJavaNetInetAddressValue (env, inetAddr, (U_8 *)nAddrBytes,	(U_32 *)&length);
       nPort = hysock_htons ((U_16) port);
       hysock_sockaddr_init6 (&sockaddrP,(U_8 *)	nAddrBytes, length,
 	    HYADDR_FAMILY_AFINET4, nPort, 0, scope_id,
@@ -738,20 +738,20 @@
     }
   else
     {
-      netGetJavaNetInetAddressValue (env, inetAddress, nlocalAddrBytes,	
-	&length);
+      netGetJavaNetInetAddressValue (env, inetAddress, (U_8 *)nlocalAddrBytes,	
+	(U_32 *)&length);
 
       nPort = hysock_htons ((U_16) localPort);
       if (length == HYSOCK_INADDR6_LEN)	
 	{
 	  netGetJavaNetInetAddressScopeId (env,	inetAddress, &scope_id);
-	  hysock_sockaddr_init6	(&sockaddrP, nlocalAddrBytes, length,
+	  hysock_sockaddr_init6	(&sockaddrP, (U_8 *)nlocalAddrBytes, length,
 	    HYADDR_FAMILY_AFINET6, nPort, 0, scope_id,
 	    socketP);
 	}
       else
 	{
-	  hysock_sockaddr_init6	(&sockaddrP, nlocalAddrBytes, length,
+	  hysock_sockaddr_init6	(&sockaddrP, (U_8 *)nlocalAddrBytes, length,
 	    HYADDR_FAMILY_AFINET4, nPort, 0, scope_id,
 	    socketP);
 	}
@@ -937,7 +937,7 @@
   result = hysock_setflag (HYSOCK_MSG_OOB, &flags);
   if (!result)
     {
-      result = hysock_write (socketP, &data, 1,	flags);	
+      result = hysock_write (socketP, (U_8 *)&data, 1,	flags);	
     }
 
   /* Always throw an exception if all the data cannot be sent because Java methods
@@ -978,7 +978,7 @@
       return;
     }
 
-  netGetJavaNetInetAddressValue	(env, inetAddress, nAddrBytes, &length);
+  netGetJavaNetInetAddressValue	(env, inetAddress, (U_8 *)nAddrBytes, (U_32 *)&length);
 
   nPort	= hysock_htons ((U_16) remotePort);
   if (length ==	HYSOCK_INADDR_LEN)
@@ -1075,20 +1075,20 @@
       return 0;
     }
 
-  netGetJavaNetInetAddressValue (env, inetAddress, nlocalAddrBytes,
-                                 &length);
+  netGetJavaNetInetAddressValue (env, inetAddress, (U_8 *)nlocalAddrBytes,
+                                 (U_32 *)&length);
 
   nPort = hysock_htons ((U_16) localPort);
   if (length == HYSOCK_INADDR6_LEN)
     {
       netGetJavaNetInetAddressScopeId (env, inetAddress, &scope_id);
-      hysock_sockaddr_init6 (&sockaddrP, nlocalAddrBytes, length,
+      hysock_sockaddr_init6 (&sockaddrP, (U_8 *)nlocalAddrBytes, length,
                              HYADDR_FAMILY_AFINET6, nPort, 0, scope_id,
                              socketP);
     }
   else
     {
-      hysock_sockaddr_init6 (&sockaddrP, nlocalAddrBytes, length,
+      hysock_sockaddr_init6 (&sockaddrP, (U_8 *)nlocalAddrBytes, length,
                              HYADDR_FAMILY_AFINET4, nPort, 0, scope_id,
                              socketP);
     }
@@ -1225,7 +1225,7 @@
 	}
     }
   result =
-    hysock_readfrom (hysocketP,	message, localCount, flags, &sockaddrP);
+    hysock_readfrom (hysocketP,	(U_8 *)message, localCount, flags, &sockaddrP);
   if (result > 0)
     (*env)->SetByteArrayRegion (env, data, offset, result, message);
   hymem_free_memory (message);
@@ -1306,7 +1306,7 @@
 
   /* read the data and copy it to the return array, then free the buffer as we
      no	longer need it */
-  result = hysock_read (hysocketP, message, localCount,	flags);	
+  result = hysock_read (hysocketP, (U_8 *)message, localCount,	flags);	
   if (result > 0)
     {
       (*env)->SetByteArrayRegion (env, data, offset, result, message);
@@ -1367,20 +1367,20 @@
   int flags;
   U_32 scope_id	= 0;
 
-  netGetJavaNetInetAddressValue	(env, inetAddress, nhostAddrBytes, &length);
+  netGetJavaNetInetAddressValue	(env, inetAddress, (U_8 *)nhostAddrBytes, (U_32 *)&length);
   nPort	= hysock_htons ((U_16) targetPort);
 
   socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
   if (length ==	HYSOCK_INADDR6_LEN)
     {
       netGetJavaNetInetAddressScopeId (env, inetAddress, &scope_id);
-      hysock_sockaddr_init6 (&sockaddrP, nhostAddrBytes, length,
+      hysock_sockaddr_init6 (&sockaddrP, (U_8 *)nhostAddrBytes, length,
 	   HYADDR_FAMILY_AFINET6, nPort,
 	   (trafficClass & 0xFF) << 20,	scope_id, socketP);
     }
   else
     {
-      hysock_sockaddr_init6 (&sockaddrP, nhostAddrBytes, length,
+      hysock_sockaddr_init6 (&sockaddrP, (U_8 *)nhostAddrBytes, length,
 	   HYADDR_FAMILY_AFINET4, nPort, 0, scope_id,
 	   socketP);
     }
@@ -1409,7 +1409,7 @@
 	  return (jint)	0;
 	}
       result =
-	hysock_writeto (socketP, message + sent, (I_32)	msgLength - sent,
+	hysock_writeto (socketP, (U_8 *)message + sent, (I_32)	msgLength - sent,
 	flags, &sockaddrP);
       if (result < 0)
 	break;
@@ -1481,7 +1481,7 @@
 
       /* try to	send the next block of data */
       result =
-	hysock_write (socketP, message + sent, (I_32) msgLength	- sent,	
+	hysock_write (socketP, (U_8 *)message + sent, (I_32) msgLength	- sent,	
 	flags);	
       if (result < 0)
 	{
@@ -1624,7 +1624,7 @@
     }
   else
     {
-      netGetJavaNetInetAddressValue (env, inetAddress, nAddrBytes, &length);
+      netGetJavaNetInetAddressValue (env, inetAddress, (U_8 *)nAddrBytes, (U_32 *)&length);
       nPort = hysock_htons ((U_16) remotePort);	
       if (length == HYSOCK_INADDR_LEN)
 	{
@@ -1782,8 +1782,8 @@
 
   if (inetAddress != NULL)
     {
-      netGetJavaNetInetAddressValue (env, inetAddress, nhostAddrBytes,
-	&length);
+      netGetJavaNetInetAddressValue (env, inetAddress, (U_8 *)nhostAddrBytes,
+	(U_32 *)&length);
 
       socketP =	
 	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env,
@@ -1886,7 +1886,7 @@
     }
   else
     {
-      message =	internalBuffer;	
+      message =	(jbyte *)internalBuffer;	
     }
 
   result =
@@ -1941,7 +1941,7 @@
     }
   else
     {
-      message =	internalBuffer;	
+      message =	(jbyte *)internalBuffer;	
     }
 
 
@@ -2137,7 +2137,7 @@
     }
   else
     {
-      hysock_sockaddr_address6 (&sockaddrP, byte_array,	&length, &scope_id);
+      hysock_sockaddr_address6 (&sockaddrP, (U_8 *)byte_array,	&length, &scope_id);
       /* Cannot	call gethostbyaddr since it is not reentrant on	some OS's */
       return newJavaNetInetAddressGenericB (env, byte_array, length,
 	      scope_id);
@@ -2489,7 +2489,6 @@
  */
 JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_setInetAddressImpl

   (JNIEnv *env,	jobject	thisClz, jobject sender, jbyteArray address){
-   PORT_ACCESS_FROM_ENV	(env);
    I_8 * passAddr = NULL;
    jbyteArray addr_array =
      (jbyteArray) ((*env)->GetObjectField (env,
@@ -2498,7 +2497,7 @@
                                                           FID_java_net_InetAddress_address)));
    I_32	length = (*env)->GetArrayLength	(env, address);	
    addr_array =	(*env)->NewByteArray(env, (jsize) length);
-   (*env)->GetByteArrayRegion (env, address, 0,	length,	passAddr);
-   (*env)->SetByteArrayRegion (env, addr_array,	0, length, passAddr);
+   (*env)->GetByteArrayRegion (env, address, 0,	length,	(jbyte *)passAddr);
+   (*env)->SetByteArrayRegion (env, addr_array,	0, length, (jbyte *)passAddr);
 }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/bigint.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/bigint.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/bigint.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/bigint.c
Thu Sep 28 21:58:45 2006
@@ -190,7 +190,7 @@
   /* ASSUME that bottomObject is nonzero, ie check and throw was done in java */
   IDATA topLength, bottomLength, topSize, bottomSize, resultLength,
     resultSize;
-  jlongArray resultObject;
+  jlongArray resultObject = NULL;
   U_32 *topStart = NULL, *bottomStart = NULL, *resultStart = NULL;
   IDATA topAt, bottomAt, resultAt;
   IDATA isNegative = 0;
@@ -467,7 +467,7 @@
                                                jlongArray src2)
 {
   IDATA len1, len2, lenR;
-  jlongArray resultObject;
+  jlongArray resultObject = NULL;
   U_32 *ar1 = NULL, *ar2 = NULL, *arR = NULL;
   IDATA isNegative = 0, tempNeg;
   IDATA shortAt, resultAt;
@@ -610,7 +610,7 @@
   /* ASSUME that bottomObject is nonzero, ie check and throw was done in java */
   IDATA topLength, bottomLength, topSize, bottomSize, resultLength,
     resultSize;
-  jlongArray resultObject;
+  jlongArray resultObject = NULL;
   U_32 *topStart = NULL, *bottomStart = NULL, *resultStart = NULL;
   IDATA topAt, bottomAt, resultAt, i, topZeroAdded = 0, tempNeg;
   I_32 signedTemp;
@@ -930,7 +930,7 @@
                                                jlongArray src, jint shiftval)
 {
   IDATA len, lenR;
-  jlongArray resultObject;
+  jlongArray resultObject = NULL;
   U_64 *ar = NULL, *shifted = NULL;
   IDATA oldAt, newAt, shiftvalr, shortenedFlag = 0;
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/dblparse.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/dblparse.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/dblparse.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/dblparse.c
Thu Sep 28 21:58:45 2006
@@ -163,7 +163,6 @@
  *have global data for use by bigIntDigitGenerator */
 #define RM_SIZE 21
 #define STemp_SIZE 22
-static U_64 R[RM_SIZE], S[STemp_SIZE], M[RM_SIZE], Temp[STemp_SIZE];
 
 jdouble
 createDouble (JNIEnv * env, const char *s, jint e)
@@ -177,7 +176,6 @@
   jdouble result;
   IDATA index = 1;
   int unprocessedDigits = 0;
-  PORT_ACCESS_FROM_ENV (env);
 
   f = def;
   fNoOverflow = defBackup;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c
Thu Sep 28 21:58:45 2006
@@ -29,7 +29,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_unlink (pathCopy);
@@ -44,7 +44,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_unlinkdir (pathCopy);
@@ -68,9 +68,11 @@
   I_32 numEntries = 0;
   UDATA findhandle;
   jarray answer = NULL;
+  dirList = NULL;
+  currentEntry = NULL;
 
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   if (length >= 1 && pathCopy[length - 1] != '\\'
       && pathCopy[length - 1] != '/')
     {
@@ -151,7 +153,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_attr (pathCopy);
@@ -166,7 +168,7 @@
   char pathCopy[HyMaxPath];
   jsize length = (*env)->GetArrayLength (env, path);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_attr (pathCopy);
@@ -181,7 +183,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_attr (pathCopy);
@@ -197,7 +199,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_lastmod (pathCopy);
@@ -213,7 +215,7 @@
   char pathCopy[HyMaxPath];
 
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_length (pathCopy);
@@ -262,7 +264,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = hyfile_mkdir (pathCopy);
@@ -279,11 +281,11 @@
   char pathExistCopy[HyMaxPath], pathNewCopy[HyMaxPath];
   length = (*env)->GetArrayLength (env, pathExist);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, pathExist, 0, length, pathExistCopy));
+  ((*env)->GetByteArrayRegion (env, pathExist, 0, length, (jbyte *)pathExistCopy));
   pathExistCopy[length] = '\0';
   length = (*env)->GetArrayLength (env, pathNew);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, pathNew, 0, length, pathNewCopy));
+  ((*env)->GetByteArrayRegion (env, pathNew, 0, length, (jbyte *)pathNewCopy));
   pathNewCopy[length] = '\0';
   ioh_convertToPlatform (pathExistCopy);
   ioh_convertToPlatform (pathNewCopy);
@@ -302,7 +304,7 @@
   char pathCopy[HyMaxPath];
   U_32 length = (U_32) (*env)->GetArrayLength (env, path);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  (*env)->GetByteArrayRegion (env, path, 0, length, pathCopy);
+  (*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy);
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
 #if defined(WIN32)
@@ -324,7 +326,7 @@
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
 
@@ -393,7 +395,7 @@
   char pathCopy[HyMaxPath];
   jsize length = (*env)->GetArrayLength (env, path);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = getPlatformIsHidden (env, pathCopy);
@@ -404,12 +406,11 @@
 Java_java_io_File_setLastModifiedImpl (JNIEnv * env, jobject recv,
                                        jbyteArray path, jlong time)
 {
-  PORT_ACCESS_FROM_ENV (env);
   I_32 result;
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
 
@@ -422,11 +423,10 @@
 Java_java_io_File_setReadOnlyImpl (JNIEnv * env, jobject recv,
                                    jbyteArray path)
 {
-  PORT_ACCESS_FROM_ENV (env);
   jsize length = (*env)->GetArrayLength (env, path);
   char pathCopy[HyMaxPath];
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   return setPlatformReadOnly (env, pathCopy);
@@ -458,7 +458,7 @@
   char pathCopy[HyMaxPath];
   jsize length = (*env)->GetArrayLength (env, path);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = getPlatformIsReadOnly (env, pathCopy);
@@ -473,7 +473,7 @@
   char pathCopy[HyMaxPath];
   jsize length = (*env)->GetArrayLength (env, path);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  ((*env)->GetByteArrayRegion (env, path, 0, length, pathCopy));
+  ((*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy));
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   result = getPlatformIsWriteOnly (env, pathCopy);
@@ -488,7 +488,7 @@
   char pathCopy[HyMaxPath];
   U_32 length = (U_32) (*env)->GetArrayLength (env, path);
   length = length < HyMaxPath - 1 ? length : HyMaxPath - 1;
-  (*env)->GetByteArrayRegion (env, path, 0, length, pathCopy);
+  (*env)->GetByteArrayRegion (env, path, 0, length, (jbyte *)pathCopy);
   pathCopy[length] = '\0';
   ioh_convertToPlatform (pathCopy);
   if (platformReadLink (pathCopy))

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/fltparse.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/fltparse.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/fltparse.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/fltparse.c
Thu Sep 28 21:58:45 2006
@@ -118,7 +118,6 @@
   jfloat result;
   IDATA index = 1;
   int unprocessedDigits = 0;
-  PORT_ACCESS_FROM_ENV (env);
 
   f = def;
   fNoOverflow = defBackup;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
Thu Sep 28 21:58:45 2006
@@ -21,10 +21,13 @@
  */
 #include <search.h>
 #include <string.h>
+#include <stdlib.h>
 #include "vmi.h"
 #include "jclglob.h"
 #include "hyport.h"
 #include "strhelp.h"
+#include "jsig.h"
+#include "hycomp.h"
 
 static UDATA keyInitCount = 0;
 
@@ -89,7 +92,7 @@
         }
 
        /* Should we check if bootclasspath is already set to avoid unexpected overriding?
*/
-       /* But this seems to conflict with default IBM VME settings...
+       /*  But this seems to conflict with default IBM VME settings...*/
        /* (*vmInterface)->GetSystemProperty (vmInterface, BOOTCLASSPATH_PROPERTY, &bootPath);*/
        if (!bootPath) 
        {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c
Thu Sep 28 21:58:45 2006
@@ -47,8 +47,6 @@
 jdouble internal_nextafter(jdouble arg1,jdouble arg2);
 jfloat  internal_nextafterf(jfloat arg1,jfloat arg2);
 
-extern scaleUpDouble (double *, int);
-
 jdouble
 internal_acos (jdouble arg1)
 {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Thu Sep 28 21:58:45 2006
@@ -743,7 +743,7 @@
     (jbyteArray) ((*env)->GetObjectField (env, anInetAddress,
             getJavaNetInetAddressIpaddress(env)));
   *length = (*env)->GetArrayLength (env, byte_array);
-  (*env)->GetByteArrayRegion (env, byte_array, 0, *length, buffer);
+  (*env)->GetByteArrayRegion (env, byte_array, 0, *length, (jbyte *)buffer);
 }
 
 /**
@@ -804,9 +804,8 @@
 createAliasArray (JNIEnv * env, jbyte ** addresses, I_32 * family, U_32 count,
       char *hName, U_32 * scope_id_array)
 {
-  PORT_ACCESS_FROM_ENV (env);
   U_32 i, length;
-  jobjectArray aliases;
+  jobjectArray aliases = NULL;
   jobject element;
   jclass tempClass = (*env)->FindClass (env, "java/net/InetAddress");
 
@@ -883,7 +882,7 @@
   for (i = 0; i < (U_32) length; i++)
     {
       memset (temp_address, 0, HYSOCK_INADDR6_LEN);
-      hysock_getaddrinfo_address (addresses, temp_address, i, &scope_id);
+      hysock_getaddrinfo_address (addresses, (U_8 *)temp_address, i, &scope_id);
 
       /* On some platforms we get duplicate addresses back for each protocol type, 
       we only want 1 per list, so we're filtering duplicates */
@@ -898,7 +897,7 @@
       if (!contains)
         {
           aliasList[count] =
-            (U_8 *) hymem_allocate_memory (HYSOCK_INADDR6_LEN);
+            (jbyte *) hymem_allocate_memory (HYSOCK_INADDR6_LEN);
           hysock_getaddrinfo_family (addresses, &family[count], i);
           scope_id_array[count] = scope_id;
           memcpy (aliasList[count++], temp_address, HYSOCK_INADDR6_LEN);
@@ -1832,7 +1831,6 @@
 	jclass addr_class = (*env)->FindClass(env,"Ljava/net/InetAddress;");
 	jmethodID addr_new = (*env)->GetMethodID(env,addr_class,"<init>","()V");
 	jobject localAddr_object = (*env)->NewObject(env,addr_class,addr_new);
-	jclass socketaddr_class = (*env)->FindClass(env,"java/net/InetSocketAddress");
 	jfieldID socketaddr_field = (*env)->GetFieldID(env,channel_class,"connectAddress","Ljava/net/InetSocketAddress;");
 	jobject socketaddr_object = (*env)->GetObjectField(env,channel_object,socketaddr_field);
 	jbyteArray addr_array;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.h?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.h
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.h
Thu Sep 28 21:58:45 2006
@@ -174,4 +174,6 @@
 
 void setServerSocketLocalAddressContent(JNIEnv * env, jclass socketImpl_class, jobject socketImpl_object,
jbyte * localAddr);
 
+void setSocketLocalAddressContent(JNIEnv * env, jclass channel_class, jobject channel_object,jbyte
* address);
+
 #endif /* nethelp_h */

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/netif.c
Thu Sep 28 21:58:45 2006
@@ -55,8 +55,6 @@
   jobject element = NULL;
 
   /* misc variables needed for looping and determining inetAddress info */
-  U_32 length = 0;
-  I_32 family = 0;
   U_32 i = 0;
   U_32 j = 0;
   U_32 nameLength = 0;
@@ -131,7 +129,7 @@
               return NULL;
             }
           (*env)->SetByteArrayRegion (env, bytearray, (jint) 0, nameLength,
-                                      networkInterfaceArray.elements[j].name);
+                                      (jbyte *)networkInterfaceArray.elements[j].name);
           name =
             (*env)->CallStaticObjectMethod (env, utilClass, utilMid,
                                             bytearray, (jint) 0, nameLength);
@@ -151,7 +149,7 @@
               return NULL;
             }
           (*env)->SetByteArrayRegion (env, bytearray, (jint) 0, nameLength,
-                                      networkInterfaceArray.elements[j].
+                                      (jbyte *)networkInterfaceArray.elements[j].
                                       displayName);
           displayName =
             (*env)->CallStaticObjectMethod (env, utilClass, utilMid,
@@ -166,7 +164,7 @@
       for (i = 0; i < networkInterfaceArray.elements[j].numberAddresses; i++)
         {
           element = newJavaNetInetAddressGenericB (env,
-                                                   networkInterfaceArray.
+                                                   (jbyte *)networkInterfaceArray.
                                                    elements[j].addresses[i].
                                                    addr.bytes,
                                                    networkInterfaceArray.

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/process.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/process.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/process.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/process.c
Thu Sep 28 21:58:45 2006
@@ -70,7 +70,7 @@
           throwNewOutOfMemoryError (env, "");
           goto failed;
         }
-      (*env)->GetByteArrayRegion (env, element, 0, len, command[i]);
+      (*env)->GetByteArrayRegion (env, element, 0, len, (jbyte *)command[i]);
       command[i][len] = 0;
     }
   if (envLength)
@@ -84,7 +84,7 @@
             throwNewOutOfMemoryError (env, "");
             goto failed;
           }
-        (*env)->GetByteArrayRegion (env, envString, 0, len, envArray[i]);
+        (*env)->GetByteArrayRegion (env, envString, 0, len, (jbyte *)envArray[i]);
         envArray[i][len] = 0;
       }
   /* NULL terminate for UNIX (does work on windows too; in fact, it doesn't care) */
@@ -185,8 +185,6 @@
 Java_org_apache_harmony_luni_internal_process_ProcessInputStream_closeImpl (JNIEnv * env,
                 jobject recv)
 {
-  PORT_ACCESS_FROM_ENV (env);
-
   new_ioh_close (env, recv,
      JCL_CACHE_GET (env,
         FID_org_apache_harmony_luni_internal_process_ProcessInputStream_fd));
@@ -196,7 +194,6 @@
 Java_org_apache_harmony_luni_internal_process_ProcessOutputStream_closeImpl (JNIEnv * env,
                  jobject recv)
 {
-  PORT_ACCESS_FROM_ENV (env);
   new_ioh_close (env, recv,
      JCL_CACHE_GET (env,
         FID_org_apache_harmony_luni_internal_process_ProcessOutputStream_fd));

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/socket.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/socket.c?view=diff&rev=451118&r1=451117&r2=451118
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/socket.c
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/socket.c
Thu Sep 28 21:58:45 2006
@@ -188,7 +188,7 @@
       return NULL;
     }
   hysock_sockaddr_address6 (&sockaddrP, byte_array, &length, &scope_id);
-  return newJavaNetInetAddressGenericB (env, byte_array, length, scope_id);
+  return newJavaNetInetAddressGenericB (env, (jbyte *)byte_array, length, scope_id);
 
 }
 
@@ -352,7 +352,7 @@
             {
               result =
                 hysock_getopt_int (hysocketP, HY_IPPROTO_IPV6,
-                                   HY_MCAST_INTERFACE_2, &interfaceIndex);
+                                   HY_MCAST_INTERFACE_2, (I_32 *)&interfaceIndex);
               if (0 != result)
                 {
                   throwJavaNetSocketException (env, result);
@@ -555,7 +555,7 @@
             {
               result =
                 hysock_getopt_int (hysocketP, HY_IPPROTO_IPV6,
-                                   HY_MCAST_INTERFACE_2, &interfaceIndex);
+                                   HY_MCAST_INTERFACE_2, (I_32 *)&interfaceIndex);
               if (0 != result)
                 {
                   throwJavaNetSocketException (env, result);
@@ -709,7 +709,7 @@
   U_8 address[HYSOCK_INADDR6_LEN];
   hysockaddr_struct sockaddrP;
 
-  netGetJavaNetInetAddressValue (env, optVal, address, &length);
+  netGetJavaNetInetAddressValue (env, optVal, address, (U_32 *)&length);
   hysock_sockaddr_init6 (&sockaddrP, address, length, HYADDR_FAMILY_AFINET4,
                          0, 0, 0, hysocketP);
   result =
@@ -896,7 +896,7 @@
   else  /* we are polling */
     {
       I_32 pollTimeoutUSec = 100000, pollMsec = 100;
-      UDATA finishTime;
+      UDATA finishTime = 0;
       IDATA timeLeft = timeout;
       BOOLEAN hasTimeout = timeout > 0;
       
@@ -1137,7 +1137,7 @@
   U_32 value;
 
   value = intValue (env, optVal);
-  result = hysock_setopt_int (hysocketP, level, option, &value);
+  result = hysock_setopt_int (hysocketP, level, option, (I_32 *)&value);
   if (0 != result)
     {
       throwJavaNetSocketException (env, result);
@@ -1163,7 +1163,7 @@
   I_32 result;
   BOOLEAN optval;
 
-  result = hysock_getopt_int (hysocketP, level, option, &optval);
+  result = hysock_getopt_int (hysocketP, level, option, (I_32 *)&optval);
   if (0 != result)
     {
       throwJavaNetSocketException (env, result);
@@ -1197,11 +1197,11 @@
 
   /* first set REUSEPORT.  Ignore the error as not all platforms will support this */
   result =
-    hysock_setopt_int (hysocketP, HY_SOL_SOCKET, HY_SO_REUSEPORT, &value);
+    hysock_setopt_int (hysocketP, HY_SOL_SOCKET, HY_SO_REUSEPORT, (I_32 *)&value);
 
   /* now set REUSEADDR.  We expect this to work */
   result =
-    hysock_setopt_int (hysocketP, HY_SOL_SOCKET, HY_SO_REUSEADDR, &value);
+    hysock_setopt_int (hysocketP, HY_SOL_SOCKET, HY_SO_REUSEADDR, (I_32 *)&value);
   if (0 != result)
     {
       throwJavaNetSocketException (env, result);



Mime
View raw message