From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19109 invoked by alias); 21 Nov 2001 21:59:45 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 18866 invoked from network); 21 Nov 2001 21:59:24 -0000 Date: Tue, 13 Nov 2001 13:49:00 -0000 From: "Frank Ch. Eigler" To: Geoffrey Keating Cc: sid@sources.redhat.com Subject: Re: patch for location-independence Message-ID: <20011121165918.F30770@redhat.com> References: <200111212133.fALLXlp11797@thief.cygnus.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="G6nVm6DDWH/FONJq" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200111212133.fALLXlp11797@thief.cygnus.com>; from geoffk@cygnus.com on Wed, Nov 21, 2001 at 01:33:47PM -0800 X-SW-Source: 2001-q4/txt/msg00023.txt.bz2 --G6nVm6DDWH/FONJq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1292 Hi - On Wed, Nov 21, 2001 at 01:33:47PM -0800, Geoffrey Keating wrote: : The attached patch causes SID to look at argv[0] to determine its : location, so that the installed sid tree can be moved anywhere and : there is no need to set SID_EXEC_PREFIX (to run the sid executable, : at least). :=20 : OK to commit? Thank you for giving this a try, however, I have a few reservations though about the propriety of this approach. For one thing, global variables such as sidutil::argv0[] are generally unwelcome in sid, among other reasons for interfering with shared library mechanisms. For another, it is necessary to use systematic C++ namespace prefixing on ~all the identifiers; testing with gcc 3.0+ helps uncover problems like that. The code also does too much (all) work anew for each file search. It would be better to put this logic into sid/main/mainDynamic.cxx itself; if getenv(SID_EXEC_PREFIX) is unset, it could endavour to compute a plausible value and put it into the environment. (It could do the same to a hypothetical SID_PREFIX while at it.) The sidutil code could then go unchanged, or even simplified. Does this make sense? (I wonder too to what extent the code in question was begat by gcc; sid is (C) Red Hat, not (C) FSF; is there a reason for concern?) - FChE --G6nVm6DDWH/FONJq Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 232 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7/CO2VZbdDOm/ZT0RAgcgAJ9Fwi8yubKZiLo1WrPfeXfd9lApQwCfeXUx IGZUl0CSNjv4+GKD00ga0l0= =vjpK -----END PGP SIGNATURE----- --G6nVm6DDWH/FONJq-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Frank Ch. Eigler" To: Geoffrey Keating Cc: sid@sources.redhat.com Subject: Re: patch for location-independence Date: Wed, 21 Nov 2001 13:59:00 -0000 Message-ID: <20011121165918.F30770@redhat.com> References: <200111212133.fALLXlp11797@thief.cygnus.com> X-SW-Source: 2001-q4/msg00040.html Message-ID: <20011121135900.l-DYqCxxP2d1S3DmrcPSltHQktX5Bd-_Ra257URBD3s@z> Hi - On Wed, Nov 21, 2001 at 01:33:47PM -0800, Geoffrey Keating wrote: : The attached patch causes SID to look at argv[0] to determine its : location, so that the installed sid tree can be moved anywhere and : there is no need to set SID_EXEC_PREFIX (to run the sid executable, : at least). : : OK to commit? Thank you for giving this a try, however, I have a few reservations though about the propriety of this approach. For one thing, global variables such as sidutil::argv0[] are generally unwelcome in sid, among other reasons for interfering with shared library mechanisms. For another, it is necessary to use systematic C++ namespace prefixing on ~all the identifiers; testing with gcc 3.0+ helps uncover problems like that. The code also does too much (all) work anew for each file search. It would be better to put this logic into sid/main/mainDynamic.cxx itself; if getenv(SID_EXEC_PREFIX) is unset, it could endavour to compute a plausible value and put it into the environment. (It could do the same to a hypothetical SID_PREFIX while at it.) The sidutil code could then go unchanged, or even simplified. Does this make sense? (I wonder too to what extent the code in question was begat by gcc; sid is (C) Red Hat, not (C) FSF; is there a reason for concern?) - FChE -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7/CO2VZbdDOm/ZT0RAgcgAJ9Fwi8yubKZiLo1WrPfeXfd9lApQwCfeXUx IGZUl0CSNjv4+GKD00ga0l0= =vjpK -----END PGP SIGNATURE-----