From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9737 Path: news.gmane.org!not-for-mail From: Shiz Newsgroups: gmane.linux.lib.musl.general Subject: Re: Why there's no __MUSL__ macro question Date: Wed, 23 Mar 2016 15:17:58 +0100 Message-ID: <23DC04DE-6EB0-49A1-BEEE-3A57C3E099DC@shiz.me> References: <20160323132840.GD69755@wopr.sciops.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FD6F5684-84C3-49B5-B74E-E2112542E360"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: ger.gmane.org 1458742720 5042 80.91.229.3 (23 Mar 2016 14:18:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 14:18:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9750-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 23 15:18:35 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aijcI-000782-U4 for gllmg-musl@m.gmane.org; Wed, 23 Mar 2016 15:18:35 +0100 Original-Received: (qmail 18299 invoked by uid 550); 23 Mar 2016 14:18:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 18281 invoked from network); 23 Mar 2016 14:18:26 -0000 X-Pgp-Agent: GPGMail 2.6b2 In-Reply-To: <20160323132840.GD69755@wopr.sciops.net> X-Mailer: Apple Mail (2.3112) Xref: news.gmane.org gmane.linux.lib.musl.general:9737 Archived-At: --Apple-Mail=_FD6F5684-84C3-49B5-B74E-E2112542E360 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 23 Mar 2016, at 14:28, Kurt H Maier wrote: >=20 > On Wed, Mar 23, 2016 at 01:08:16PM +0000, Sirgio Marques wrote: >>=20 >> How are we expected to solve this kind of problem if not by using the >> __MUSL__ macro? >=20 > The recommended solution is to fix the code to be portable, instead of > installing yet another special-case workaround. >=20 > In this case, wrapping the "#include " line in an > #ifdef __GLIBC__ would be more appropriate than special-casing for = musl, > since musl is not the only environment that lacks execinfo.h. I = suspect > this code would also fail to build on cygwin, for instance. >=20 > If there existed a __MUSL__ macro, the maintainers of software like = this > would just use it instead of writing portable code. By refusing to > implement a __MUSL__ macro, musl is helping to urge projects in the > right direction. >=20 > khm Alternatively, a better approach would be the detection of = =E2=80=99s existence by something like ./configure and defining a HAVE_EXECINFO_H = macro as a result that the file can use. That way you=E2=80=99re not = cluttering the source files with platform-specific information. - Shiz --Apple-Mail=_FD6F5684-84C3-49B5-B74E-E2112542E360 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJW8qWlAAoJEI8YjKeZk+kHNpYQAMCfH7v25dmbyXl11/YzVfMM 39qCHHsEt1uS7oKFTIPMpgPDMztH262MTAAIcC20AtUoi3ZVVIxl+7Mb3F+zDJq8 exkk5pESZ6g5lmJ61VC5Y7vHmaRjCg6S4e4KObyt3m0mvpAmCpUocE0TVEE6ZWVe YwAAYHckSdZEQKgkQelpK/ajgGMtvn8EtZjD1+nKfvPnICozEgZEP9AqX9I4n9lG s4XCZXAeFHVkf5sCqfAMcn0zGyELPviF80rnvHifCYkUNIrW9bEf34a7MY1CvaU+ 3J2tM4dDGodyPfq716A2j+069xXUfyWeJt48fzafN7N3PY3NrFBK1fY5zGfxzmqw dkT+VuNnJOQKClnbTUhBhQSp7aynsV/szZlpTBTaqN6/LRJEr7EMAsDi7luXhEzC vdinwocwu99eNUW5rOrret2ReDn1EinP8U/RCfR8MpjZwFDFUF6MLHE3vsianwNu mifnnIqb5DSAnhMp0kvQL7oSY3rJfVF0WK0jg9ATcVxcXBQXmc9JvCW0IT1Pc7Yb p2MYlRbaQC2vCITbqabPTziUKc9Te94LlOj/6Jd9B3CrfWRDzsvhjsp7rDKBL8Cj Ze5YOg3QcxB1u2xkId6HLI59R1H9lqFTdIaZg6sTg34sz5gohYxknLBZ2V/Zv9Hm CxFUCnU7nnxeXX3HuHfA =fC9r -----END PGP SIGNATURE----- --Apple-Mail=_FD6F5684-84C3-49B5-B74E-E2112542E360--