#include
* Bill Allombert [Fri, Nov 17 2006, 04:48:11PM]:
> On Sat, Jun 11, 2005 at 12:23:33PM +0200, Eduard Bloch wrote:
> > Package: boa
> > Version: 0.94.14rc20-1.2
> > Severity: important
> >
> > Hello,
>
> Hello Eduard and Teófilo,
> I plan to NMU boa to fix most of the oustanding bugs.
>
> > a while ago I have sent you patches to enable LFS support.
> > Unfortunately, it is broken again. It cuts file size to
> > n mod 4GB which makes only the first hundred MiB of a DVD image
> > accessible, for example.
> >
> > Please fix that. You still have my patch, it should be easy to port it
> > to the current version.
>
> Well, I do not have them. Could you update them for boa 0.94.14rc21 ?
I could not find it here, and even if I could I doubt they would be
easily applicable. Instead, I took the current version in sid and
modified it again. The attached version is almost okay any still have
some little glitches:
- it was not tested on real data, only sparse file to /dev/null
transfer
- detection of LFS support is not added, I hardcoded good values into
config.h.in
- I have used off_t as the main type everywhere. On some places even
for "unsigned int" where it looked like it would not hurt at the
first glance
Eduard.
--
Halloechen, ihr Spinner, so frueh auf?
nein, wir schlafen alle im kollektiv
mein alkoven ist kaputt
alkohol kaputt?
diff -urd boa-0.94.14rc20/debian/changelog
boa-0.94.14rc20.lfspatched/debian/changelog
--- boa-0.94.14rc20/debian/changelog2006-01-01 00:01:59.0 +0100
+++ boa-0.94.14rc20.lfspatched/debian/changelog 2006-11-17 22:44:34.245211733
+0100
@@ -1,3 +1,10 @@
+boa (0.94.14rc20-1.4) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * LFS fixes
+
+ -- Eduard Bloch <[EMAIL PROTECTED]> Fri, 17 Nov 2006 22:44:28 +0100
+
boa (0.94.14rc20-1.3) unstable; urgency=low
* Non Maintainer Upload
diff -urd boa-0.94.14rc20/debian/rules boa-0.94.14rc20.lfspatched/debian/rules
--- boa-0.94.14rc20/debian/rules2006-01-01 00:01:59.0 +0100
+++ boa-0.94.14rc20.lfspatched/debian/rules 2006-11-18 00:49:05.668146486
+0100
@@ -18,7 +18,8 @@
build-stamp:
dh_testdir
- CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE" ./configure;make
+ #CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE"
+ ./configure;make
cd docs;make boa.html boa.info
touch build-stamp
diff -urd boa-0.94.14rc20/src/boa.h boa-0.94.14rc20.lfspatched/src/boa.h
--- boa-0.94.14rc20/src/boa.h 2006-01-01 00:01:59.0 +0100
+++ boa-0.94.14rc20.lfspatched/src/boa.h2006-11-17 23:54:29.535400985
+0100
@@ -25,7 +25,9 @@
#ifndef _BOA_H
#define _BOA_H
+/* Important, include before anything else */
#include "config.h"
+
#include
#include /* malloc, free, etc. */
#include /* stdin, stdout, stderr */
@@ -165,7 +167,7 @@
void clean_pathname(char *pathname);
char *get_commonlog_time(void);
void rfc822_time_buf(char *buf, time_t s);
-char *simple_itoa(unsigned int i);
+char *simple_itoa(uint64_t i);
int boa_atoi(const char *s);
int month2int(const char *month);
int modified_since(time_t * mtime, const char *if_modified_since);
diff -urd boa-0.94.14rc20/src/buffer.c boa-0.94.14rc20.lfspatched/src/buffer.c
--- boa-0.94.14rc20/src/buffer.c2006-01-01 00:01:59.0 +0100
+++ boa-0.94.14rc20.lfspatched/src/buffer.c 2006-11-18 00:42:40.364066486
+0100
@@ -211,7 +211,7 @@
return -2;
if (bytes_to_write) {
-int bytes_written;
+off_t bytes_written;
bytes_written = write(req->fd, req->buffer + req->buffer_start,
bytes_to_write);
diff -urd boa-0.94.14rc20/src/config.h.in
boa-0.94.14rc20.lfspatched/src/config.h.in
--- boa-0.94.14rc20/src/config.h.in 2006-01-01 00:01:59.0 +0100
+++ boa-0.94.14rc20.lfspatched/src/config.h.in 2006-11-17 23:40:54.980494485
+0100
@@ -205,3 +205,17 @@
/* Define to `int' if doesn't define. */
#undef uid_t
+
+#define LFS_ENABLED
+
+/* Those enable the LFS ready structures in the system headers */
+#ifdef LFS_ENABLED
+#define _FILE_OFFSET_BITS 64 /* glibc style */
+#define _LARGEFILE_SOURCE 1/* To make ftello() visible (HP-UX 10.20). */
+#define _LARGE_FILES 1 /* Large file defined on AIX-style hosts. */
+
+#define _LARGEFILE64_SOURCE /* tell kernel headers to provide the O_LARGEFILE
value */
+#define PRINTF_SIZE_ARG "%lld"
+#else
+#define PRINTF_SIZE_ARG "%ld"
+#endif
diff -urd boa-0.94.14rc20/src/get.c boa-0.94.14rc20.lfspatched/src/get.c
--- boa-0.94.14rc20/src/get.c 2006-01-01 00:01:59.0 +0100
+++ boa-0.94.14rc20.lfspatched/src/get.c2006-11-18 00:43:20.398568485
+0100
@@ -25,6 +25,10 @@
#include "boa.h"
#include "access.h"
+#include
+#include
+#include
+
#define STR(s) __STR(s)
#define __STR(s) #s
@@ -52,9 +56,9 @@
{
int data_fd, saved_errno;
struct stat statb