From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/709 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: sed unmacro Date: Thu, 12 Apr 2012 19:45:13 -0700 Message-ID: <20120412194513.01ed5cbc@newbook> References: <20120410130024.10acbcfb@newbook> <20120412023520.GF7281@brightrain.aerifal.cx> <20120412165912.403fc411@newbook> <20120413001851.GG7281@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1334285145 20052 80.91.229.3 (13 Apr 2012 02:45:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2012 02:45:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-710-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 13 04:45:45 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SIWW6-0007IQ-RM for gllmg-musl@plane.gmane.org; Fri, 13 Apr 2012 04:45:42 +0200 Original-Received: (qmail 3487 invoked by uid 550); 13 Apr 2012 02:45:42 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3476 invoked from network); 13 Apr 2012 02:45:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=VJfQkr0UEGDsReZ7IGzKYducsXYv7ik9QchYdBWxgEQFQfQicybB0OA9sqAzuAKy/gxlxeeQb2ICT5sNdBVPjOzjE7FYd0FEDcrwSew7rhOOL3BoyJXe6NFEstUyUTRqxqadvdF6mgSW/zHq4AP0v39LlECTY81nPBS4La4SDFM=; h=Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20120413001851.GG7281@brightrain.aerifal.cx> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:709 Archived-At: On Thu, 12 Apr 2012 20:18:51 -0400 Rich Felker wrote: > On Thu, Apr 12, 2012 at 04:59:12PM -0700, Isaac Dunham wrote: > > This is the only way to access BIOS calls from Linux; unfortunately, > > using the BIOS is necessary for proper screen setup/resume on some > > machines. > > This should really be fixed at the driver level (writing the correct > driver code rather than calling out to potentially-buggy/dangerous > BIOS code that might even contain trojans installed when another OS > was running and flashed the BIOS secretly), but demanding that it be > fixed is outside the scope/authority of musl... :( In some cases, it may be beyond the realm of feasibility: it seems that a number of hardware vendors are convinced that they need their own (incompatible, of course!) VGA initialization process, so doing it "correctly" on one laptop will get you nothing on another. AtomBIOS does the opposite, but that's AMD only. Unfortunately, we're stuck working with the hardware that we get, not hardware done properly. > > I also noticed that it's using __uid_t & __gid_t, which appear to be > > replaced by uid_t & gid_t in musl. It may be wrong/unportable to > > depend on implementation-specific stuff (__*), but I've seen these > > several times before (a LOT of stuff won't build without > > modification). > This is something I intend to stand firm on. Software using type names > in the reserved namespace is absolutely broken, has no excuse for > doing so, and needs to be fixed. Please file bug reports. .. > If this problem is as widespread as you say, it may be worthwhile to > write a utility that recursively runs sed on a source tree, fixing all > instances, and generates a patch to send upstream... Doesn't run recursively or generate a patch, but... sed -e 's/__\([ug]id_t\)/\1/g' \ -e 's/__long_double_t/long\ double/g' \ -e 's/__BEGIN_DECLS/#ifdef\ __cplusplus\nextern\ \"C\"\ {\n#endif/g' \ -e 's/__END_DECLS/#ifdef\ __cplusplus\n}\n#endif/g' makes a number of changes that are commonly needed. And in case of macros like __P() (from sys/compat.h): sed -e 's/__PM\{,1\}T\{,1\}(\(.*\))/\1/g' \ -e 's/__NTH(\(.*\))/\1/g' \ -e 's/__STRING(\(.*\))/#\1/g' This part is not as foolsafe--it fails on more complicated stuff like __STRING(somestring); sin(x);