From owner-freebsd-current@FreeBSD.ORG Fri Apr 2 04:30:56 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0D831065678 for ; Fri, 2 Apr 2010 04:30:56 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 82B8B8FC1D for ; Fri, 2 Apr 2010 04:30:56 +0000 (UTC) Received: by pwi9 with SMTP id 9so1676562pwi.13 for ; Thu, 01 Apr 2010 21:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=toaziNlgzjDCLiXbIWdpvloRD98RjxLXhhOTHmGjrKw=; b=IneV/zKxRojhTFsWW7n9DUVyEIaQiwKNvdZHAHLqfcyZHvwrtTk9kq9U2094IzJjhe ijpACX2nLerkJ2M7fLcC/ITY8JJOdIcMYYjZsizHO+CGdmmSty+q3TYGycZ507NJN4aW z301QhUEIgywUoHVOyg1IaWtXmxh1RoKABSoM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=cF5gOSCsXttQC7J275p+71in7OSJSuswE2WuRUfUZb6MQbyoANpLhfo7P4f4TOg9Cf DpCdRRWXycA9bmKfHQqmZ5I1YT4f7xlkq2jWyHX8QbY63De0xMMWcbifYdMTmb62DuZI 8aewc7BMVYaawkyONhiML4LbOjwn5BJ+DgdQ8= MIME-Version: 1.0 Received: by 10.140.127.14 with HTTP; Thu, 1 Apr 2010 21:30:55 -0700 (PDT) In-Reply-To: <4BB4FB35.2040703@uffner.com> References: <4BA7E0B8.3080406@delphij.net> <4BAE2B4F.6060005@protected-networks.net> <4BB3FD5D.9070600@uffner.com> <4BB4FB35.2040703@uffner.com> Date: Thu, 1 Apr 2010 21:30:55 -0700 Received: by 10.141.213.23 with SMTP id p23mr1284582rvq.159.1270182655949; Thu, 01 Apr 2010 21:30:55 -0700 (PDT) Message-ID: From: Xin LI To: Tom Uffner Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 04:30:56 -0000 Hi, Tom, On Thu, Apr 1, 2010 at 12:59 PM, Tom Uffner wrote: [...] > i realize this. i was just adding to the list of ports that no longer > build after this change. ghostscript is kind of important for print > support. > > i doubt this is "right" either, but it is a quick & dirty way to > make mplayer compile again: > > --- configure.orig =C2=A0 =C2=A0 =C2=A02010-04-01 15:49:37.000000000 -040= 0 > +++ configure =C2=A0 2010-04-01 15:50:50.000000000 -0400 > @@ -5337,7 +5337,7 @@ > =C2=A0#include > =C2=A0int main(void) { return 0; } > =C2=A0EOF > - =C2=A0 =C2=A0cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 > -D_LARGEFILE64_SOURCE \ > + =C2=A0 =C2=A0cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 \ > =C2=A0 =C2=A0 =C2=A0 -ldvdread $_ld_dl && _dvdread=3Dyes && _res_comment= =3D"external" > =C2=A0 fi > =C2=A0fi > @@ -7412,8 +7412,6 @@ > =C2=A0if test "$_largefiles" =3D yes || freebsd ; then > =C2=A0 CFLAGS=3D"$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64" > =C2=A0 if test "$_dvdread" =3D yes || test "$_libdvdcss_internal" =3D yes= ; then > - =C2=A0 =C2=A0# dvdread support requires this (for off64_t) > - =C2=A0 =C2=A0CFLAGS=3D"$CFLAGS -D_LARGEFILE64_SOURCE" > =C2=A0 =C2=A0 cygwin && CFLAGS=3D"$CFLAGS -DSYS_CYGWIN" > =C2=A0 fi > =C2=A0fi Specifying -DFOO basically means in C code one have: %%% #define FOO 1 %%% This would not cause problem for zlib, at least not for zlib 1.2.4.1. However, defining it do cause *64 interfaces being included, the assumption doesn't seem right, according to my understanding of GNU libc's manual. I was wrong in a previous e-mail that it's not -D_LARGEFILE64_SOURCE itself being broken, but #define _LARGEFILE64_SOURCE broken if it's not defined as '1'. GNU libc seems to test whether this is defined, rather than testing it against '1' (zlib do this). So in conclusion: a) We actually face two different types of problems, one is defining _LARGEFILE64_SOURCE on FreeBSD, this is not right. It should not be defined at all; another is to have "#define _LARGEFILE64_SOURCE" instead of "#define _LARGEFILE64_SOURCE 1", this type would break not only on FreeBSD but perhaps some other platforms, unfortunately this seems to be common. Should one hit either case, please have it fixed by upstream developers, as it would benefit not only FreeBSD but also other platforms. b) For now I have implemented a temporary solution on -HEAD by unifdef'ing _LARGEFILE64_SOURCE, _LFS64_SOURCE on zlib.h and zconf.h, so ports may appear as "fixed". This is not ideal since it makes us to diverge away from zlib. A better solution is under discussion and this situation MAY change in the next import. Cheers, --=20 Xin LI http://www.delphij.net