Date: Thu, 01 Apr 2010 15:30:47 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Xin LI <delphij@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: HEADSUP: zlib updated [svn commit: r205471 - in head: . lib/libz lib/libz/contrib lib/libz/doc sys/sys] Message-ID: <86tyrvs3js.fsf@ds4.des.no> In-Reply-To: <r2oa78074951003312051kca872e0el511273674bd9e4b@mail.gmail.com> (Xin LI's message of "Wed, 31 Mar 2010 20:51:58 -0700") References: <4BA7E0B8.3080406@delphij.net> <4BAE2B4F.6060005@protected-networks.net> <4BB3FD5D.9070600@uffner.com> <r2oa78074951003312051kca872e0el511273674bd9e4b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Xin LI <delphij@gmail.com> writes: > Tom Uffner <tom@uffner.com> writes: > > Michael Butler <imb@protected-networks.net> writes: > > > This breaks most (if not all) of the QT4-dependent ports for the > > > lack of a definition of "off64_t". > > it also breaks multimedia/mplayer, graphics/ImageMagick, and > > print/ghostscript8 & everything that depends on it. > Just because they used to compile DOES NOT mean they were right. It's > NOT right to define _LARGEFILE64_SOURCE on FreeBSD, see: > > http://www.delorie.com/gnu/docs/glibc/libc_13.html Nor is it correct on Linux. As the above link says, _LARGEFILE64_SOURCE is a hack that was introduced to ease the transition from 32-bit off_t to 64-bit off_t. The correct idiom is to define _FILE_OFFSET_BITS to 64 before including <sys/types.h> and <sys/stat.h>. http://www.delorie.com/gnu/docs/glibc/libc_13.html That was *fourteen years ago*, almost to the day. There is *no* excuse for using this hack today. *Especially* in software that was written long after that document was published. *Especially* when all you need to do to get it right is add AC_SYS_LARGEFILE to configure.ac and use off_t, struct stat and stat() / lstat() (without the "64" suffix) as if none of this had ever happened. And yes, I *will* keep harping on this until people Get It. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tyrvs3js.fsf>