aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/bits (follow)
Commit message (Expand)AuthorAgeFilesLines
* fix types for wctype_t and wctrans_t•••wctype_t was incorrectly "int" rather than "long" on x86_64. not only is this an ABI incompatibility; it's also a major design flaw if we ever wanted wctype_t to be implemented as a pointer, which would be necessary if locales support custom character classes, since int is too small to store a converted pointer. this commit fixes wctype_t to be unsigned long on all archs, matching the LSB ABI; this change does not matter for C code, but for C++ it affects mangling. the same issue applied to wctrans_t. glibc/LSB defines this type as const __int32_t *, but since no such definition is visible, I've just expanded the definition, int, everywhere. it would be nice if these types (which don't vary by arch) could be in wctype.h, but the OB XSI requirement in POSIX that wchar.h expose some types and functions from wctype.h precludes doing so. glibc works around this with some hideous hacks, but trying to duplicate that would go against the intent of musl's headers. Rich Felker2013-03-041-2/+2
* add missing mmap options and madvices to bits/mman.h based on linux headersSzabolcs Nagy2013-01-121-0/+6
* add missing F_GETOWNER_UIDS flag to bits/fcntl.hSzabolcs Nagy2013-01-121-0/+2
* add more arch-specific MAP_ macros to bits/mman.h•••these are also needed by qemu. rofl0r2012-12-061-0/+4
* 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. rofl0r2012-12-061-0/+1
* fixup mcontext stuff to expost gregset_t/fpregset_t as appropriateRich Felker2012-11-251-1/+19
* 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. Rich Felker2012-11-251-0/+4
* 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. Rich Felker2012-11-232-40/+53
* fix termios constants on mipsRich Felker2012-11-231-10/+21
* 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. Rich Felker2012-11-231-11/+11
* fix up leftover, incorrect NSIG definitions in arch-specific signal.hRich Felker2012-11-231-1/+0
* 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. Rich Felker2012-11-211-0/+2
* 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. Rich Felker2012-11-181-0/+0
* 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. rofl0r2012-11-181-12/+9
* 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. Rich Felker2012-11-151-1/+1
* fix numerous mips abi constant definition mismatchesRich Felker2012-11-053-89/+120
* better support for reverse-endian variants of arm/mips/microblaze•••these macros are supported by more compilers Rich Felker2012-10-181-0/+4
* floating point environment/exceptions support for mipsRich Felker2012-10-181-3/+13
* fix broken semctl on systems that don't use IPC_64 flag•••not tested on mips and arm; they may still be broken. x86_64 should be ok now. Rich Felker2012-09-221-0/+2
* add O_EXEC open mode•••the linux O_PATH mode provides the necessary semantics for both the O_SEARCH and O_EXEC modes defined and required by POSIX 2008. Rich Felker2012-09-151-0/+1
* add O_PATH/O_SEARCH support to fcntl.h•••I'm not 100% sure that Linux's O_PATH meets the POSIX requirements for O_SEARCH, but it seems very close if not perfect. and old kernels ignore it, so O_SEARCH will still work as desired as long as the caller has read permissions to the directory. Rich Felker2012-09-131-0/+2
* syscall organization overhaul•••now public syscall.h only exposes __NR_* and SYS_* constants and the variadic syscall function. no macros or inline functions, no __syscall_ret or other internal details, no 16-/32-bit legacy syscall renaming, etc. this logic has all been moved to src/internal/syscall.h with the arch-specific parts in arch/$(ARCH)/syscall_arch.h, and the amount of arch-specific stuff has been reduced to a minimum. changes still need to be reviewed/double-checked. minimal testing on i386 and mips has already been performed. Rich Felker2012-09-081-87/+0
* avoid "inline" in public headers for strict c89 compatibility•••while musl itself requires a c99 compiler, some applications insist on being compiled with c89 compilers, and use of "inline" in the headers was breaking them. much of this had been avoided already by just skipping the inline keyword in pre-c99 compilers or modes, but this new unified solution is cleaner and may/should result in better code generation in the default gcc configuration. Rich Felker2012-09-021-7/+7
* fix incorrect ptrdiff_t type on mipsRich Felker2012-08-101-1/+1
* add defines for number of sigset_t bytes syscalls expect•••yet another gratuitous mips incompatibility... Rich Felker2012-08-091-0/+2
* further fixes for mips ioctl.h header•••untested; hopefully it's right now Rich Felker2012-08-071-4/+4
* fix another mips gratuitous-incompatibility bug: ioctl numbersRich Felker2012-08-071-2/+2
* fix socket.h on mips•••why does mips have to be gratuitously incompatible in every possible imaginable way? Rich Felker2012-08-051-0/+3
* add floating point register saving/restoring to mips setjmp/longjmp•••also fix the alignment of jmp_buf to meet the abi. linux always emulates fpu on mips if it's not present, so enabling this code unconditionally is "safe" but may be slow. in the long term it may be preferable to find a way to disable it on soft float builds. Rich Felker2012-07-221-1/+1
* workaround another sendmsg kernel bug on 64-bit machines•••the kernel wrongly expects the cmsg length field to be size_t instead of socklen_t. in order to work around the issue, we have to impose a length limit and copy to a local buffer. the length limit should be more than sufficient for any real-world use; these headers are only used for passing file descriptors and permissions between processes over unix sockets. Rich Felker2012-07-121-0/+7
* fix redef of sigprocmask constants on mips•••this fix is easier than trying to reorder the header stuff Rich Felker2012-07-121-0/+3
* more mips bits-header fixes•••signal handling was very broken because of this Rich Felker2012-07-121-2/+6
* fix mips syscalls with long long args•••like arm, mips requires 64-bit arguments to be "aligned" on an even register boundary. Rich Felker2012-07-121-1/+1
* fix mips mcontext_t structure size•••otherwise offs in ucontext_t will be wrong, and break code that inspects or modifies the signal makes (including cancellation code). Rich Felker2012-07-121-1/+5
* fix MAP_ANONYMOUS value for mips, remove cruft copied from i386Rich Felker2012-07-111-2/+1
* initial version of mips (o32) port, based on work by Richard Pennington (rdp)•••basically, this version of the code was obtained by starting with rdp's work from his ellcc source tree, adapting it to musl's build system and coding style, auditing the bits headers for discrepencies with kernel definitions or glibc/LSB ABI or large file issues, fixing up incompatibility with the old binutils from aboriginal linux, and adding some new special cases to deal with the oddities of sigaction and pipe syscall interfaces on mips. at present, minimal test programs work, but some interfaces are broken or missing. threaded programs probably will not link. Rich Felker2012-07-1125-0/+1809