Commit Graph

200 Commits

Author SHA1 Message Date
Szabolcs Nagy bc1a8d2ae3 add missing EXTPROC flag to bits/termios.h
mips and powerpc already had this termios flag defined
2013-01-12 19:42:39 +01:00
Szabolcs Nagy 73bb048951 add missing F_GETOWNER_UIDS flag to bits/fcntl.h 2013-01-12 19:42:39 +01:00
Szabolcs Nagy 056c8b1ab5 add missing EHWPOISON to bits/errno.h
it was already defined for mips, but was missing from other archs
2013-01-12 19:42:39 +01:00
rofl0r 3bb167b338 x86_64/bits/signal.h: fix typo in REG_CSGSFS 2012-12-19 06:09:57 +01:00
Rich Felker 03b0f13e90 fix trailing whitespace issues that crept in here and there 2012-12-07 16:16:44 -05:00
Rich Felker 5c5e45e58b move signal.h REG_* macros under _GNU_SOURCE protection
they were accidentally exposed under just baseline POSIX, which is a
big namespace pollution issue. thankfully glibc only exposes them
under _GNU_SOURCE, not under any of its other options, so omitting
the pollution in the default _BSD_SOURCE profile does not hurt
application compatibility at all.
2012-12-06 17:05:19 -05:00
rofl0r a631c5df53 bits/signal.h: add register names for x86(_64)
glibc exposes them from ucontext.h.
since that header includes signal.h, it is safe to put them
into bits/signal.h, if _GNU_SOURCE is defined.
2012-12-06 18:14:49 +01:00
rofl0r 7e0d4fce41 add more arch-specific MAP_ macros to bits/mman.h
these are also needed by qemu.
2012-12-06 16:57:22 +01:00
rofl0r db846a6217 remove MAP_32 from non-x86 archs
both kernel and glibc define it only on x86(_64).
2012-12-06 01:26:51 +01:00
rofl0r 0e10f74006 add MAP_NORESERVE to bits/mman.h
this is needed for qemu, and since it differs for each arch
it can't be circumvented easily by using a macro in CFLAGS.
2012-12-06 01:26:51 +01:00
Rich Felker 7aa73925e7 fix regression in arm user.h that happened during big user.h changes 2012-12-04 09:32:45 -05:00
Rich Felker df31363d8c remove stat member aliases from ppc-specific bits/stat.h
if these are to be supported, they belong in the main stat.h, not
repeated for each arch.
2012-11-26 20:42:20 -05:00
Rich Felker a8da6c2f28 fixup mcontext stuff to expost gregset_t/fpregset_t as appropriate 2012-11-25 23:04:23 -05:00
Rich Felker 4b75f4ed8d make sys/procfs.h mostly work on most archs
these structures are purely for use by trace/debug tools and tools
working with core files. the definition of fpregset_t, which was
previously here, has been removed because it was wrong; fpregset_t
should be the type used in mcontext_t, not the type used in
ptrace/core stuff.
2012-11-25 22:28:18 -05:00
Rich Felker 132cc703f8 remove microblaze user.h incorrectly copied from arm 2012-11-25 21:12:34 -05:00
Rich Felker 4acc95e497 begin sys/user.h and sys/reg.h fixes for ports
aside from microblaze, these should be roughly correct for all archs
now. some misc junk macros and typedefs are missing, which should
probably be added for max compatibility with trace/debug tools.
2012-11-23 20:05:43 -05:00
Rich Felker 98f56b12ce fix powerpc ucontext, again..
it should now really match the kernel. some of the removed padding
corresponded to the difference between user and kernel sigset_t. the
space at the end was redundant with the uc_mcontext member and seems
to have been added as a result of misunderstanding glibc's definition
versus the kernel's.
2012-11-23 19:54:56 -05:00
Rich Felker 144dc4f479 fix termios constants on mips 2012-11-23 17:23:38 -05:00
Rich Felker c72fc23843 sigcontext/mcontext cleanup for arch-specific bits
with these changes, the members/types of mcontext_t and related stuff
should closely match the glibc definitions. unlike glibc, however, the
definitions here avoid using typedefs as much as possible and work
directly with the underlying types, to minimize namespace pollution
from signal.h in the default (_BSD_SOURCE) profile.

this is a first step in improving compatibility with applications
which poke at context/register information -- mainly debuggers, trace
utilities, etc. additional definitions in ucontext.h and other headers
may be needed later.

if feature test macros are used to request a conforming namespace,
mcontext_t is replaced with an opaque structure of the equivalent size
and alignment; conforming programs cannot examine its contents anyway.
2012-11-23 14:35:25 -05:00
Rich Felker a50136dfe1 fix powerpc setjmp/longjmp to save/restore float regs; enlarge/align jmp_buf 2012-11-23 14:30:58 -05:00
Rich Felker 7538708f8b fix up leftover, incorrect NSIG definitions in arch-specific signal.h 2012-11-23 12:20:53 -05:00
Rich Felker b0756d88a0 remove stuff that doesn't belong in powerpc 32-bit sigcontext
these fields were wrongly copied from the kernel's ppc64 struct def
2012-11-23 11:27:25 -05:00
Rich Felker 4860db9f54 more ppc signal.h typedef order fixes 2012-11-21 13:51:14 -05:00
Rich Felker 808f225b7c fix misordered typedefs in ppc signal.h 2012-11-21 13:50:40 -05:00
Rich Felker b5e3832f85 ppc signal/NSIG related fix (warning fix, redefinition) 2012-11-21 13:49:31 -05:00
Rich Felker 65b98213e4 add back NSIG, removed from powerpc in last commit, but for all archs
unlike the previous definition, NSIG/_NSIG is supposed to be one more
than the highest signal number. adding this will allow simplifying
libc-internal code that makes signal-related syscalls, which can be
done as a later step. some apps might use it too; while this usage is
questionable, it's at least not insane.
2012-11-21 13:41:58 -05:00
Rich Felker 57a0b82441 make powerpc signal.h namespace-clean for posix/isoc
also handle the non-GNUC case where alignment attribute is not available
by simply omitting it. this will not cause problems except for
inclusion of mcontex_t/ucontext_t in application-defined structures,
since the natural alignment of the uc_mcontext member relative to the
start of ucontext_t is already correct. and shame on whoever designed
this for making it impossible to satisfy the ABI requirements without
GNUC extensions.
2012-11-21 13:36:01 -05:00
Rich Felker 7bdf11c2c6 fix powerpc types to match abi, and some feature test issues 2012-11-21 13:29:50 -05:00
rofl0r 2df4f6f17b fix invalid usage of mcontext_t in powerpc signal.h 2012-11-21 06:24:05 +01:00
Rich Felker 0004ea613a fix breakage from introducing bits header for sys/io.h
apparently some other archs have sys/io.h and should not break just
because they don't have the x86 port io functions. provide a blank
bits/io.h everywhere for now.
2012-11-18 19:58:15 -05:00
Rich Felker 61aa6324af add port io functions to sys/io.h
based on proposal by Isaac Dunham. nonexistance of bits/io.h will
cause inclusion of sys/io.h to produce an error on archs that are not
supposed to have it. this is probably the desired behavior, but the
error message may be a bit unusual.
2012-11-18 19:31:58 -05:00
Rich Felker f54ac2446a add missing const on powerpc FE_DFL_ENV 2012-11-18 16:58:05 -05:00
Rich Felker 75c450cff3 fenv support for ppc, untested
based on code sent to the mailing list by nsz, with minor changes.
2012-11-18 16:31:14 -05:00
rofl0r 8d2887f884 fcntl.h: O_SEARCH was missing for powerpc
put some macros that do not differ between architectures in the
main header and remove from bits.
restructure mips header so it has the same structure as the others.
2012-11-18 05:14:40 +01:00
rofl0r ae67fe1aad ppc socket.h: add forgotten cmsghdr 2012-11-18 02:42:55 +01:00
Rich Felker a4db94ab78 dynamic linking support for powerpc
incomplete but at least partly working. requires all files to be
compiled in the new "secure" plt model, not the old one that put plt
code in the data segment. TLS is untested but may work. invoking the
dynamic linker explicitly to load a program does not yet handle argv
correctly.
2012-11-16 22:22:34 -05:00
Rich Felker 7718e7cce5 fix ppc stat structure definition 2012-11-16 01:19:42 -05:00
rofl0r 3bb6bd8580 fix powerpc termios.h and ioctl.h 2012-11-16 04:55:52 +01:00
Rich Felker 91738d0241 disable SO_REUSEPORT in sys/socket.h
although a number is reserved for it, this option is not implemented
on Linux and does not work. defining it causes some applications to
use it, and subsequently break due to its failure.
2012-11-15 19:16:10 -05:00
Rich Felker 7491bac33e ppc wchar_t is long, not int 2012-11-15 16:01:54 -05:00
Rich Felker e7257d3e63 fix powerpc atomic compare-and-swap function
previous version did not compare at all; it was just a fancy atomic
write. untested. further atomic fixes may be needed.
2012-11-14 14:24:22 -05:00
Rich Felker 574d01a696 update ppc atomic code to match the endian-agnostic version on other archs 2012-11-14 14:08:33 -05:00
Rich Felker 50cb6dbb0c fix wchar limits mistakenly copied from arm 2012-11-14 14:04:10 -05:00
rofl0r 1c8eb8bad7 PPC port cleaned up, static linking works well now. 2012-11-13 19:12:25 +01:00
Richard Pennington 7669d1e334 import preliminary ppc work by rdp. 2012-11-13 18:15:10 +01:00
Rich Felker 32d6d77e54 fix numerous mips abi constant definition mismatches 2012-11-05 14:29:04 -05:00
Rich Felker dde325d7b3 fix struct stat size/padding on microblaze 2012-10-19 18:52:14 -04:00
Rich Felker 25011215be inline syscalls for microblaze 2012-10-18 22:13:36 -04:00
Rich Felker 64251d8bbd better support for reverse-endian variants of arm/mips/microblaze
these macros are supported by more compilers
2012-10-18 21:50:55 -04:00
Rich Felker f321de9e0a floating point environment/exceptions support for mips 2012-10-18 20:19:53 -04:00