diff -u ../axel-1.0b.orig/axel.c ./axel.c
--- ../axel-1.0b.orig/axel.c	2002-05-03 14:45:11.000000000 +0200
+++ ./axel.c	2005-10-12 21:02:44.000000000 +0200
@@ -28,7 +28,7 @@
 /* Axel */
 static void save_state( axel_t *axel );
 static void *setup_thread( void * );
-static void axel_message( axel_t *axel, char *format, ... );
+static void axel_message( axel_t *axel, char *format, ... ) __attribute__ ((format (printf, 2, 3)));
 static void axel_divide( axel_t *axel );
 
 static char *buffer = NULL;
@@ -123,7 +123,7 @@
 	if( ( axel->size = axel->conn[0].size ) != INT_MAX )
 	{
 		if( axel->conf->verbose > 0 )
-			axel_message( axel, _("File size: %i bytes"), axel->size );
+			axel_message( axel, _("File size: %lli bytes"), axel->size );
 	}
 	
 	/* Wildcards in URL --> Get complete filename			*/
@@ -167,7 +167,7 @@
 		for( i = 0; i < axel->conf->num_connections; i ++ )
 			read( fd, &axel->conn[i].currentbyte, sizeof( axel->conn[i].currentbyte ) );
 
-		axel_message( axel, _("State file found: %i bytes downloaded, %i to go."),
+		axel_message( axel, _("State file found: %lli bytes downloaded, %lli to go."),
 			axel->bytes_done, axel->size - axel->bytes_done );
 		
 		close( fd );
@@ -260,7 +260,8 @@
 void axel_do( axel_t *axel )
 {
 	fd_set fds[1];
-	int hifd, i, j, size;
+	int hifd, i;
+	off_t j, size;
 	struct timeval timeval[1];
 	
 	/* Create statefile if necessary				*/
@@ -356,7 +357,7 @@
 		if( write( axel->outfd, buffer, size ) != size )
 		{
 			
-			axel_message( axel, _("Write error!") );
+		  axel_message( axel, _("Write error! %lli %s") ,size, strerror(errno)  );
 			axel->ready = -1;
 			return;
 		}
diff -u ../axel-1.0b.orig/axel.h ./axel.h
--- ../axel-1.0b.orig/axel.h	2002-05-03 14:45:18.000000000 +0200
+++ ./axel.h	2005-10-12 21:02:44.000000000 +0200
@@ -95,7 +95,7 @@
 	char filename[MAX_STRING];
 	double start_time;
 	int next_state, finish_time;
-	int bytes_done, start_byte, size;
+	off_t bytes_done, start_byte, size;
 	int bytes_per_second;
 	int delay_time;
 	int outfd;
diff -u ../axel-1.0b.orig/configure ./configure
--- ../axel-1.0b.orig/configure	2002-03-29 14:52:11.000000000 +0100
+++ ./configure	2005-10-12 21:02:44.000000000 +0200
@@ -184,6 +184,7 @@
 ;;
 Linux )
 	echo 'LFLAGS+=-lpthread' >> Makefile.settings
+	echo 'CFLAGS+=-D_FILE_OFFSET_BITS=64' >> Makefile.settings
 ;;
 SunOS )
 	echo '#define NOGETOPTLONG' >> config.h
diff -u ../axel-1.0b.orig/conn.h ./conn.h
--- ../axel-1.0b.orig/conn.h	2001-12-15 18:28:38.000000000 +0100
+++ ./conn.h	2005-10-12 21:02:44.000000000 +0200
@@ -42,9 +42,9 @@
 	
 	ftp_t ftp[1];
 	http_t http[1];
-	int size;		/* File size, not 'connection size'..	*/
-	int currentbyte;
-	int lastbyte;
+	off_t size;		/* File size, not 'connection size'..	*/
+	off_t currentbyte;
+	off_t lastbyte;
 	int fd;
 	int enabled;
 	int supported;
diff -u ../axel-1.0b.orig/ftp.c ./ftp.c
--- ../axel-1.0b.orig/ftp.c	2001-12-15 18:59:03.000000000 +0100
+++ ./ftp.c	2005-10-12 21:02:44.000000000 +0200
@@ -95,9 +95,9 @@
 }
 
 /* Get file size. Should work with all reasonable servers now		*/
-int ftp_size( ftp_t *conn, char *file, int maxredir )
+off_t ftp_size( ftp_t *conn, char *file, int maxredir )
 {
-	int i, j, size = MAX_STRING;
+	off_t i, j, size = MAX_STRING;
 	char *reply, *s, fn[MAX_STRING];
 	
 	/* Try the SIZE command first, if possible			*/
@@ -106,7 +106,7 @@
 		ftp_command( conn, "SIZE %s", file );
 		if( ftp_wait( conn ) / 100 == 2 )
 		{
-			sscanf( conn->message, "%*i %i", &i );
+			sscanf( conn->message, "%*i %lli", &i );
 			return( i );
 		}
 		else if( conn->status / 10 != 50 )
@@ -199,10 +199,10 @@
 	else
 	{
 		s = strstr( reply, "\n-" );
-		i = sscanf( s, "%*s %*i %*s %*s %i %*s %*i %*s %100s", &size, fn );
+		i = sscanf( s, "%*s %*i %*s %*s %lli %*s %*i %*s %100s", &size, fn );
 		if( i < 2 )
 		{
-			i = sscanf( s, "%*s %*i %i %*i %*s %*i %*i %100s", &size, fn );
+			i = sscanf( s, "%*s %*i %lli %*i %*s %*i %*i %100s", &size, fn );
 			if( i < 2 )
 			{
 				return( -2 );
diff -u ../axel-1.0b.orig/ftp.h ./ftp.h
--- ../axel-1.0b.orig/ftp.h	2001-12-15 18:56:09.000000000 +0100
+++ ./ftp.h	2005-10-12 21:02:44.000000000 +0200
@@ -43,4 +43,4 @@
 int ftp_command( ftp_t *conn, char *format, ... );
 int ftp_cwd( ftp_t *conn, char *cwd );
 int ftp_data( ftp_t *conn );
-int ftp_size( ftp_t *conn, char *file, int maxredir );
+off_t ftp_size( ftp_t *conn, char *file, int maxredir );
Common subdirectories: ../axel-1.0b.orig/gui and ./gui
diff -u ../axel-1.0b.orig/http.c ./http.c
--- ../axel-1.0b.orig/http.c	2002-01-25 15:26:40.000000000 +0100
+++ ./http.c	2005-10-12 21:02:44.000000000 +0200
@@ -107,9 +107,9 @@
 	if( conn->firstbyte )
 	{
 		if( conn->lastbyte )
-			http_addheader( conn, "Range: bytes=%i-%i", conn->firstbyte, conn->lastbyte );
+			http_addheader( conn, "Range: bytes=%lli-%lli", conn->firstbyte, conn->lastbyte );
 		else
-			http_addheader( conn, "Range: bytes=%i-", conn->firstbyte );
+			http_addheader( conn, "Range: bytes=%lli-", conn->firstbyte );
 	}
 }
 
@@ -193,15 +193,16 @@
 	return( NULL );
 }
 
-int http_size( http_t *conn )
+off_t http_size( http_t *conn )
 {
 	char *i;
-	int j;
+	off_t j;
 	
 	if( ( i = http_header( conn, "Content-Length:" ) ) == NULL )
 		return( -2 );
-	
-	sscanf( i, "%i", &j );
+
+	sscanf( i, "%lli", &j );
+
 	return( j );
 }
 
diff -u ../axel-1.0b.orig/http.h ./http.h
--- ../axel-1.0b.orig/http.h	2002-01-25 15:18:23.000000000 +0100
+++ ./http.h	2005-10-12 21:02:44.000000000 +0200
@@ -33,8 +33,8 @@
 	char headers[MAX_QUERY];
 	int proto;			/* FTP through HTTP proxies	*/
 	int proxy;
-	int firstbyte;
-	int lastbyte;
+	off_t firstbyte;
+	off_t lastbyte;
 	int status;
 	int fd;
 	char *local_if;
@@ -43,9 +43,9 @@
 int http_connect( http_t *conn, int proto, char *proxy, char *host, int port, char *user, char *pass );
 void http_disconnect( http_t *conn );
 void http_get( http_t *conn, char *lurl );
-void http_addheader( http_t *conn, char *format, ... );
+void http_addheader( http_t *conn, char *format, ... )  __attribute__ ((format (printf, 2, 3)));
 int http_exec( http_t *conn );
 char *http_header( http_t *conn, char *header );
-int http_size( http_t *conn );
+off_t http_size( http_t *conn );
 void http_encode( char *s );
 void http_decode( char *s );
diff -u ../axel-1.0b.orig/search.c ./search.c
--- ../axel-1.0b.orig/search.c	2001-12-06 19:29:58.000000000 +0100
+++ ./search.c	2005-10-12 21:02:44.000000000 +0200
@@ -88,7 +88,7 @@
 	s = malloc( size );
 	
 	sprintf( s, "http://www.filesearching.com/cgi-bin/s?q=%s&w=a&l=en&"
-		"t=f&e=on&m=%i&o=n&s1=%i&s2=%i&x=15&y=15",
+		"t=f&e=on&m=%i&o=n&s1=%lli&s2=%lli&x=15&y=15",
 		conn->file, results->conf->search_amount,
 		conn->size, conn->size );
 	
diff -u ../axel-1.0b.orig/text.c ./text.c
--- ../axel-1.0b.orig/text.c	2002-02-19 20:45:55.000000000 +0100
+++ ./text.c	2005-10-12 21:32:30.000000000 +0200
@@ -26,9 +26,9 @@
 #include "axel.h"
 
 static void stop( int signal );
-static char *size_human( int value );
-static char *time_human( int value );
-static void print_commas( int bytes_done );
+static char *size_human( off_t value );
+static char *time_human( off_t value );
+static void print_commas( off_t bytes_done );
 static void print_alternate_output( axel_t *axel );
 static void print_help();
 static void print_version();
@@ -342,9 +342,9 @@
 						if( prev >= 1024 )
 							printf( "  [%6.1fKB/s]", (double) axel->bytes_per_second / 1024 );
 						if( axel->size < 10240000 )
-							printf( "\n[%3i%%]  ", min( 100, 102400 * i / axel->size ) );
+							printf( "\n[%3lli%%]  ", min( 100, 102400 * i / axel->size ) );
 						else
-							printf( "\n[%3i%%]  ", min( 100, i / ( axel->size / 102400 ) ) );
+							printf( "\n[%3lli%%]  ", min( 100, i / ( axel->size / 102400 ) ) );
 					}
 					else if( ( i % 10 ) == 0 )
 					{
@@ -408,12 +408,12 @@
 }
 
 /* Convert a number of bytes to a human-readable form			*/
-char *size_human( int value )
+char *size_human( off_t value )
 {
 	if( value == 1 )
-		sprintf( string, _("%i byte"), value );
+		sprintf( string, _("%lli byte"), value );
 	else if( value < 1024 )
-		sprintf( string, _("%i bytes"), value );
+		sprintf( string, _("%lli bytes"), value );
 	else if( value < 10485760 )
 		sprintf( string, _("%.1f kilobytes"), (float) value / 1024 );
 	else
@@ -423,23 +423,23 @@
 }
 
 /* Convert a number of seconds to a human-readable form			*/
-char *time_human( int value )
+char *time_human( off_t value )
 {
 	if( value == 1 )
-		sprintf( string, _("%i second"), value );
+		sprintf( string, _("%lli second"), value );
 	else if( value < 60 )
-		sprintf( string, _("%i seconds"), value );
+		sprintf( string, _("%lli seconds"), value );
 	else if( value < 3600 )
-		sprintf( string, _("%i:%02i seconds"), value / 60, value % 60 );
+		sprintf( string, _("%lli:%02lli seconds"), value / 60, value % 60 );
 	else
-		sprintf( string, _("%i:%02i:%02i seconds"), value / 3600, ( value / 60 ) % 60, value % 60 );
+		sprintf( string, _("%lli:%02lli:%02lli seconds"), value / 3600, ( value / 60 ) % 60, value % 60 );
 	
 	return( string );
 }
 
 /* Part of the infamous wget-like interface. Just put it in a function
 	because I need it quite often..					*/
-void print_commas( int bytes_done )
+void print_commas( off_t bytes_done )
 {
 	int i, j;
 	
@@ -455,13 +455,19 @@
 	fflush( stdout );
 }
 
+static double alternate_last_time = 0;
+
 static void print_alternate_output(axel_t *axel) 
 {
-	int done=axel->bytes_done;
-	int total=axel->size;
+	off_t done=axel->bytes_done;
+	off_t total=axel->size;
 	int i,j=0;
 	double now = gettime();
-	
+
+	if (now < alternate_last_time + 0.1)
+	  return;
+	alternate_last_time = now;
+
 	printf("\r[%3ld%%] [", min(100,(long)(done*100./total+.5) ) );
 		
 	for(i=0;i<axel->conf->num_connections;i++)
