harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r498827 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Date Mon, 22 Jan 2007 22:11:41 GMT
Author: hindessm
Date: Mon Jan 22 14:11:40 2007
New Revision: 498827

URL: http://svn.apache.org/viewvc?view=rev&rev=498827
Log:
FreeBSD sendfile support.  It may be that more OSes support the FreeBSD API
so we might need to change the conditions to use "#if defined(LINUX)".

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c

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=498827&r1=498826&r2=498827
==============================================================================
--- 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 Jan 22 14:11:40 2007
@@ -23,7 +23,12 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
+#if defined(FREEBSD)
+#include <sys/types.h>
+#include <sys/socket.h>
+#else
 #include <sys/sendfile.h>
+#endif
 #include "vmi.h"
 #include "iohelp.h"
 
@@ -234,6 +239,9 @@
   if(hysocketP == NULL)
     return -1;
   socket = hysocketP->sock;
+#if !defined(FREEBSD)
   return sendfile(socket,(int)fd,(off_t *)&offset,(size_t)count);	
+#else
+  return sendfile(fd, socket, offset, (size_t)count, NULL, NULL, 0);
+#endif
 }
-



Mime
View raw message