You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2007/03/12 10:27:14 UTC
svn commit: r517145 - in
/harmony/enhanced/classlib/trunk/modules/luni/src/main/native:
launcher/shared/main.c luni/unix/OSFileSystemLinux32.c
Author: pyang
Date: Mon Mar 12 02:27:13 2007
New Revision: 517145
URL: http://svn.apache.org/viewvc?view=rev&rev=517145
Log:
Oops, I commited wrong file for HARMONY-3334([classlib][luni-native] Native Method XXX_transferImpl in luni/src/main/native/luni/unix/OSFileSystemLinux32.c did not handle endian properly), recommit the right fix and recover the wrong one
Modified:
harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?view=diff&rev=517145&r1=517144&r2=517145
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Mon Mar 12 02:27:13 2007
@@ -933,15 +933,6 @@
options[j].optionString = classPath;
i++; /*skip next arguement */
}
- //TODO: we may find more non-standard options later, and they need to be converted like below
- //probably we need to record all these options in a properties file
- else if (strcmp(argv[i], "-verify")==0)
- {
- char *replaceString = hymem_allocate_memory(strlen("-verify")+2);
- strcpy(replaceString, "-X");
- strcat(replaceString, "verify");
- options[j].optionString = replaceString;
- }
else
{
options[j].optionString = argv[i];
Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c?view=diff&rev=517145&r1=517144&r2=517145
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c Mon Mar 12 02:27:13 2007
@@ -245,9 +245,12 @@
if(hysocketP == NULL)
return -1;
socket = hysocketP->sock;
+ //fix for HARMONY-3334, convert the jlong to int before (off_t *) to make it work
+ //on both big endian and little endian architectures
+ int off = offset;
#if !defined(FREEBSD)
- return sendfile(socket,(int)fd,(off_t *)&offset,(size_t)count);
+ return sendfile(socket,(int)fd,(off_t *)&off,(size_t)count);
#else
- return sendfile(fd, socket, offset, (size_t)count, NULL, NULL, 0);
+ return sendfile(fd, socket, off, (size_t)count, NULL, NULL, 0);
#endif
}