You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2007/06/05 17:58:45 UTC
svn commit: r544526 - in
/harmony/enhanced/classlib/trunk/modules/portlib/src:
main/native/port/windows/hyfile.c test/native/hyfile/shared/hyfile.c
Author: odeakin
Date: Tue Jun 5 08:58:44 2007
New Revision: 544526
URL: http://svn.apache.org/viewvc?view=rev&rev=544526
Log:
Two small fixes:
- Windows port library hyfile_seek fixed on Windows so it does the right thing for negative offset values.
- Fix to port library hyfile tests to avoid issues with platform dependant line endings.
Modified:
harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c
harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hyfile/shared/hyfile.c
Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c?view=diff&rev=544526&r1=544525&r2=544526
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hyfile.c Tue Jun 5 08:58:44 2007
@@ -602,7 +602,7 @@
I_32 error;
lowerOffset = (DWORD) (offset & 0xFFFFFFFF);
- upperOffset = (DWORD) ((offset >> 32) & 0x7FFFFFFF);
+ upperOffset = (DWORD) ((offset >> 32) & 0xFFFFFFFF);
if ((whence < HySeekSet) || (whence > HySeekEnd))
{
Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hyfile/shared/hyfile.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hyfile/shared/hyfile.c?view=diff&rev=544526&r1=544525&r2=544526
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hyfile/shared/hyfile.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/test/native/hyfile/shared/hyfile.c Tue Jun 5 08:58:44 2007
@@ -73,7 +73,7 @@
exit(1);
}
- hyportLibrary.file_printf(&hyportLibrary, fd, "%d%c%s\n", 1, '2', "3");
+ hyportLibrary.file_printf(&hyportLibrary, fd, "%d%c%s", 1, '2', "3");
rc = hyportLibrary.file_sync(&hyportLibrary, fd);
if (rc != 0) {
fprintf(stderr, "hyfile_sync failed %s\n",
@@ -108,7 +108,7 @@
exit(1);
}
- offset = hyportLibrary.file_seek(&hyportLibrary, fd, -11, HySeekEnd);
+ offset = hyportLibrary.file_seek(&hyportLibrary, fd, -10, HySeekEnd);
printf(" offset = %d\n", offset);
if (offset != 7) {
fprintf(stderr, "Failed to seek hytest.tmp2\n");
@@ -142,7 +142,7 @@
length = hyportLibrary.file_length(&hyportLibrary, "hytest.tmp2");
printf(" length = %d\n", length);
- if (length != 18) {
+ if (length != 17) {
fprintf(stderr, "hytest.tmp2 has incorrect length\n");
cleanup(hyportLibrary);
exit(1);