[PATCH] for solaris 2.6
Dan Astoorian
djast at cs.toronto.edu
Wed Oct 31 06:30:07 EST 2001
On Tue, 30 Oct 2001 13:41:10 EST, "Mark D. Baushke" writes:
> I didn't see this one applied to the repository yet.
>
> It may not be the best patch possible... basic problem is that
> _LARGEFILE64_SOURCE needs to be defined on Solaris 2.6 if
> AC_SYS_LARGEFILE ends up doing a '#define _FILE_OFFSET_BITS 64'
>
> If _FILE_OFFSET_BITS == 64, then <sys/resource.h> will define a
> 'struct rlimit64' but NOT define a 'struct rlimit' leading to a
> failure to compile ssh.c because 'struct rlimit' is not a complete
> type.
>
> When _LARGEFILE64_SOURCE is defined, it adds a #define rlimit rlimit64
> so that uses of 'struct rlimit rlim;' will become 'struct rlimit64 rlim;'
> by the compiler and the compilation will succeed.
>
> It may be desirable to modify the AC_SYS_LARGEFILE in the autoconf
> sources for this situation, but I have not tried to do that.
Caveat: I don't have a Solaris 2.6 machine to test against. The
following is FYI.
I'm not sure how well-supported an interface _LARGEFILE64_SOURCE is (as
opposed to _LARGEFILE_SOURCE, e.g.); <sys/feature_tests.h> refers to
_LARGEFILE64_SOURCE as a "transitional interface".
The lfcompile(5) man page (Solaris 8 version attached) provides the
supported method of compiling apps with largefile support under Solaris.
Perhaps getconf(1) should be used to define the correct flags (rather
than guessing at which macros need to be defined) to ensure
compatibility with current and future releases of Solaris.
--
Dan Astoorian People shouldn't think that it's better to have
Sysadmin, CSLab loved and lost than never loved at all. It's
djast at cs.toronto.edu not, it's better to have loved and won. All
www.cs.toronto.edu/~djast/ the other options really suck. --Dan Redican
-------------- next part --------------
An embedded message was scrubbed...
From: unknown sender
Subject: no subject
Date: no date
Size: 7877
Url: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20011030/c61d3feb/attachment.mht
More information about the openssh-unix-dev
mailing list