0678968
--- runtime/Clib/cports.c.orig	2018-01-26 02:50:11.000000000 -0700
0678968
+++ runtime/Clib/cports.c	2018-01-26 21:21:28.826703643 -0700
dedaf22
@@ -158,7 +158,7 @@ static int posix_close( FILE *f ) {
dedaf22
 }
dedaf22
 
dedaf22
 static ssize_t posix_read( FILE *f, void *buf, size_t count ) {
dedaf22
-   int n = fread( buf, 1, count, f );
dedaf22
+   size_t n = fread( buf, 1, count, f );
dedaf22
 
dedaf22
    if( n != 0 )
dedaf22
       return n;
dedaf22
@@ -174,9 +174,9 @@ static ssize_t posix_read( FILE *f, void
dedaf22
 /*    BSD compatibility kit                                            */
dedaf22
 /*---------------------------------------------------------------------*/
dedaf22
 #if( BGL_HAVE_SENDFILE && ( BGL_SENDFILE_BRAND == BGL_SENDFILE_BSD ) )
dedaf22
-static int bsd_sendfile(int out_fd, int in_fd, off_t *offset, size_t count) {
dedaf22
+static ssize_t bsd_sendfile(int out_fd, int in_fd, off_t *offset, size_t count) {
dedaf22
    off_t sz = count;
dedaf22
-   int n = sendfile( in_fd, out_fd, offset ? *offset : 0, &sz, 0, 0 );
dedaf22
+   ssize_t n = sendfile( in_fd, out_fd, offset ? *offset : 0, &sz, 0, 0 );
dedaf22
 
dedaf22
    return n ? n : sz;
dedaf22
 }
0678968
@@ -2262,7 +2262,7 @@ bgl_file_to_string( char *path ) {
0678968
 	 return 0L;
Jerry James 63e3895
       } else {
dedaf22
 	 obj_t res = make_string_sans_fill( sin.st_size );
Jerry James 63e3895
-	 int n = read( fd, BSTRING_TO_STRING( res ), sin.st_size );
Jerry James 63e3895
+	 ssize_t n = read( fd, BSTRING_TO_STRING( res ), sin.st_size );
Jerry James 63e3895
 
Jerry James 63e3895
 	 close( fd );
Jerry James 63e3895
 	 
0678968
@@ -2551,7 +2551,7 @@ bgl_sendchars( obj_t ip, obj_t op, long
Jerry James 63e3895
       }
Jerry James 63e3895
 #if( BGL_HAVE_SENDFILE )
Jerry James 63e3895
    } else {
Jerry James 63e3895
-      if( sz == -1 ) sz = in.st_size;
Jerry James 63e3895
+      if( sz == -1 ) sz = (long) in.st_size;
Jerry James 63e3895
 
Jerry James 63e3895
       if( sz != 0 ) {
Jerry James 63e3895
 #if( BGL_GC_HAVE_BLOCKING )
0678968
@@ -2661,7 +2661,7 @@ bgl_sendfile( obj_t name, obj_t op, long
Jerry James 63d50fd
 	 C_SYSTEM_FAILURE(
Jerry James 63d50fd
 	    BGL_IO_PORT_ERROR, "send-file", strerror( errno ), name );
Jerry James 63e3895
       }
Jerry James 63e3895
-      sz = sin.st_size;
Jerry James 63e3895
+      sz = (long) sin.st_size;
Jerry James 63e3895
    }
Jerry James 63e3895
 
Jerry James 63e3895
 #if( !BGL_HAVE_SENDFILE )