Subject: Help! Large file aware wu-ftpd for solaris2.6

From: Masayuki Takayanagi <[email-masked]>
Date: Sat, 27 Mar 1999 22:28:17 +0900

Hello,

I've been trying to build wu-ftpd 2.4.2 vr16 on solaris2.6  so that it
will be able to transfer large files whose size is greater than 2GB.
The building steps were:
   1.Convert 'int' variables used for file size information to 'off_t',
   2.Convert '%ld' formatting strings used for file size information to
'%lld'.
   3,Compile source files  with -D_FILE_OFFSET_BITS=64 option.
I confirmed that most commands work propery for large files.
But I'm afraid that  'REST' command will not work propery for the large
files.
Because of my poor knowledge about yacc,I can't modify ftpcmd.y so that
the 'REST' command will store a 'long long(64bit)' value into the
'restart_point' variable.
Has anyone done this work?
Any help would be appreciated

Sorry for my poor English,

Thanks,
  Masayuki Takayanagi

---

From: Gregory A Lundberg <[email-masked]>
Date: Sat, 27 Mar 1999 10:21:05 -0500 (EST)

>    2.Convert '%ld' formatting strings used for file size information to '%lld'.
> I confirmed that most commands work propery for large files. But I'm
> afraid that 'REST' command will not work propery for the large files.
> Because of my poor knowledge about yacc,I can't modify ftpcmd.y so
> that the 'REST' command will store a 'long long(64bit)' value into the
> 'restart_point' variable. Has anyone done this work? Any help would be
> appreciated

It's just C code.  Don't be afraid of it.

You'll want to change the cast (int) to cast (off_t) and the cast (long)
to cast (off_t).  restart_point is already an off_t.

Huh?  restart_point is already an off_t?  Duh!  Your change isn't an
enhancement .. it's a bugfix.  Do you really need the
D_FILE_OFFSET_BITS=64?  Is there some other way to detect that you're on a
largefile Solaris?  Look out for other, more subtle, problems when dealing
with large files.

Change or bugfix, as always, I'd like to see the diffs.

-- 

Wally .. is largefile a default part of Solaris?  If not, we need a test
to detect it.  In either case, we'll need to do the #if crap arround the
int/off_t and similar changes so we don't break when building on targets
with clueless runtime headers that don't know the difference.

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195