This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix some i386 vs. x86_64 -m32 glibc header differences


> 2004-11-01  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]