From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20132 invoked by alias); 4 Nov 2004 23:47:23 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 20113 invoked from network); 4 Nov 2004 23:47:22 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sourceware.org with SMTP; 4 Nov 2004 23:47:22 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 88225357B; Thu, 4 Nov 2004 15:47:21 -0800 (PST) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.11/8.12.9) with ESMTP id iA4NlLb1029559; Thu, 4 Nov 2004 15:47:21 -0800 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.11/8.12.11/Submit) id iA4NlKks029556; Thu, 4 Nov 2004 15:47:20 -0800 Date: Thu, 04 Nov 2004 23:47:00 -0000 Message-Id: <200411042347.iA4NlKks029556@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Jakub Jelinek Cc: Ulrich Drepper , Glibc hackers Subject: Re: [PATCH] Fix some i386 vs. x86_64 -m32 glibc header differences In-Reply-To: Jakub Jelinek's message of Monday, 1 November 2004 15:04:20 +0100 <20041101140420.GS30497@sunsite.ms.mff.cuni.cz> X-Zippy-Says: .. the MYSTERIANS are in here with my CORDUROY SOAP DISH!! X-SW-Source: 2004-11/txt/msg00007.txt.bz2 > 2004-11-01 Jakub Jelinek > > * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h [__WORDSIZE == 32] > (elf_fpxregset_t): New type. > (struct elf_prpsinfo): If __WORDSIZE == 32, change pr_[ug]id type > to unsigned short int. > * sysdeps/unix/sysv/linux/x86_64/sys/user.h > (struct user_fpregs_struct): Fix comment. > * sysdeps/i386/fpu/bits/mathdef.h (float_t, double_t): If > __FLOAT_EVAL_METHOD__ is defined and 0, typedef to float resp. double. > * sysdeps/x86_64/fpu/bits/mathdef.h: Include bits/wordsize.h. > (float_t, double_t): If -m32 and not -mfpmath=sse, typedef to > long double. > * sysdeps/x86_64/fpu/bits/fenv.h: Include bits/wordsize.h. > (fenv_t): Remove __mxcsr field for -m32. I've put these in. > 1) missing sys/elf.h on x86_64 - it is a deprecated header, so probably not > a big deal, though not hard to add If anyone actually uses this despite the #warning, then it probably ought to just move up to linux/ and be installed for compatibility on all machines. OTOH, forcing people to use sys/procfs.h instead is not a bad thing. > 2) missing sys/vm86.h on x86_64 - vm86 doesn't work on x86-64 64-bit kernel > even for 32-bit programs AFAIK, so again not a big deal Perhaps programs would prefer to diagnose this at runtime than be uncompilable. But let's wait for a complaint. > 3) gnu/lib-names.h, gnu/stubs.h - hard to fix gnu/stubs.h is pretty hard to fix. What are the differences? gnu/lib-names.h is less hard. I can make it dtrt if it's worth the trouble. > 4) bits/wchar.h - not sure why __WCHAR_M{IN,AX} on i386 are long constants > and int elsewhere, doesn't match what arches have unsigned long wchar_t > and which have unsigned int wchar_t > 5) bits/mathinline.h, bits/string.h Are these unusable in -m32, or just differ? These already differ for other ABI-compatible differing configurations (i386 vs i486, etc). So if these under -m32 just define the versions that work in 32-bit mode but are optimized for AMD64 or EM64T processors, this is fine as is. > 6) bits/byteswap.h - no support for !__GNUC__ compilers on x86_64 -m32 We don't care about non-GCC. But I would put in a patch if one were sent.