Commit Graph

469 Commits

Author SHA1 Message Date
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
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
d0197ff031 add cleaned-up sys/mtio.h
this is mostly junk, but a few programs with tape-drive support
unconditionally include it, and it might be useful.
2012-11-17 19:51:49 -05:00
5c6443ac42 add stub versions of some missing optional pthread interfaces
priority inheritance is not yet supported, and priority protection
probably will not be supported ever unless there's serious demand for
it (it's a fairly heavy-weight feature).

per-thread cpu clocks would be nice to have, but to my knowledge linux
is still not capable of supporting them. glibc fakes them by using the
_process_ cpu-time clock and subtracting the thread creation time,
which gives seriously incorrect semantics (worse than not supporting
the feature at all), so until there's a way to do it right, it will
remain as a stub that always fails.
2012-11-17 18:42:16 -05:00
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
cfbaba79a2 complex: add C11 CMPLX macros and replace cpack with them 2012-11-13 01:31:49 +01:00
7df42e8744 report support of TPS option in unistd.h and sysconf
also update another newish feature in sysconf, stackaddr
2012-11-11 15:54:20 -05:00
1e21e78bf7 add support for thread scheduling (POSIX TPS option)
linux's sched_* syscalls actually implement the TPS (thread
scheduling) functionality, not the PS (process scheduling)
functionality which the sched_* functions are supposed to have.
omitting support for the PS option (and having the sched_* interfaces
fail with ENOSYS rather than omitting them, since some broken software
assumes they exist) seems to be the only conforming way to do this on
linux.
2012-11-11 15:38:04 -05:00
32d6d77e54 fix numerous mips abi constant definition mismatches 2012-11-05 14:29:04 -05:00
fc5f16d182 mips cache flush/ctl syscall support and header 2012-11-04 17:06:31 -05:00
b367ab15fa avoid breakage if somebody wrongly defines empty feature test macros 2012-11-01 03:49:43 -04:00
18c0e02e2b add dl_iterate_phdr interface
patches by Alex Caudill (npx). the dynamic-linked version is almost
identical to the final submitted patch; I just added a couple missing
lines for saving the phdr address when the dynamic linker is invoked
directly to run a program, and removed a couple to avoid introducing
another unnecessary type. the static-linked version is based on npx's
draft. it could use some improvements which are contingent on the
startup code saving some additional information for later use.
2012-10-31 21:27:48 -04:00
4eb4844b31 fix issues with wait constants in stdlib.h
the W* namespace is not reserved, so the nonstandard ones must be
moved under extension features. also WNOHANG and WUNTRACED were
missing.
2012-10-21 19:15:11 -04:00
nsz
2d321fa062 complex: make _Complex_I work with gcc -std=c99 -pedantic-errors 2012-10-21 02:31:04 +02:00
858df113bf assert() is supposed to have type void 2012-10-17 02:47:11 -04:00
c86f2974e2 add memmem function (gnu extension)
based on strstr. passes gnulib tests and a few quick checks of my own.
2012-10-15 23:02:57 -04:00
21284ec75d microblaze TLS relocation support, completely untested 2012-10-15 21:01:48 -04:00
030e526392 add getopt reset support
based on proposed patches by Daniel Cegiełka, with minor changes:
- use a weak symbol for optreset so it doesn't clash with namespace
- also reset optpos (position in multi-option arg like -lR)
- also make getopt_long support reset
2012-09-30 20:00:38 -04:00
2e3648b85d define some _POSIX_* macros that were omitted; required for XSI conformance 2012-09-30 01:52:17 -04:00
3609e019f3 always expose accept4
it will be in the next version of POSIX
2012-09-29 17:44:33 -04:00
9735d50070 always expose dup3 and pipe2
they will be in the next version of POSIX
2012-09-29 17:42:21 -04:00
8c0a3d9e5c microblaze port
based on initial work by rdp, with heavy modifications. some features
including threads are untested because qemu app-level emulation seems
to be broken and I do not have a proper system image for testing.
2012-09-29 01:05:31 -04:00
f600105eef LFS64 alias for prlimit
issue reported/requested by Justin Cormack
2012-09-21 04:05:01 -04:00
662da62eb7 add clock_adjtime, remap_file_pages, and syncfs syscall wrappers
patch by Justin Cormack, with slight modification
2012-09-16 22:26:23 -04:00
5a1abeeb7c fix stupid bug in updating of O_ACCMODE for O_SEARCH support
this could cause major bugs, and warrants a fix release right away.
2012-09-15 23:17:00 -04:00
e2f6a3257e strsep is BSD|GNU, not GNU-only; it's originally from BSD 2012-09-13 21:01:30 -04:00
b238b37a0f 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.
2012-09-13 20:56:25 -04:00
c87584a3e9 add setdomainname syscall, fix getdomainname (previously a stub) 2012-09-09 16:50:20 -04:00
a660180c6a mincore syscall wrapper 2012-09-09 16:37:19 -04:00
2416c63b81 fix up lfs64 junk for preadv/pwritev 2012-09-09 16:33:47 -04:00
ea544bfe80 add preadv/pwritev syscall wrappers 2012-09-09 16:29:33 -04:00
743546a933 fix typo introduced in poll.h 2012-09-09 16:27:26 -04:00
141138c41b add linux ppoll syscall wrapper 2012-09-09 16:09:29 -04:00
208eb584ef 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.
2012-09-08 22:43:14 -04:00
6cf8bfdb64 add acct, accept4, setns, and dup3 syscalls (linux extensions)
based on patch by Justin Cormack
2012-09-08 20:22:08 -04:00
b10d0230c1 add IPPROTO_HOPOPTS to in.h 2012-09-08 19:52:51 -04:00
f59cedb549 add IPPROTO_MAX to in.h 2012-09-08 19:43:34 -04:00
695a04fc25 fix redundant _Noreturn def in err.h
not sure why this was missed in the earlier commit.
2012-09-08 18:16:33 -04:00
455f96857f remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
b7afd7a7ec sysmacros major/minor: result should have type unsigned int, not dev_t 2012-09-08 02:42:27 -04:00
997ba92a0f add linux tee syscall 2012-09-08 01:03:01 -04:00
00e6bbcc05 add linux sync_file_range syscall 2012-09-08 00:58:25 -04:00
90f770523f add linux readahead syscall 2012-09-08 00:40:37 -04:00
adb88e773b add fallocate (nonstandardized) function
this is equivalent to posix_fallocate except that it has an extra
mode/flags argument to control its behavior, and stores the error in
errno rather than returning an error code.
2012-09-08 00:33:04 -04:00
231b9d1880 add timerfd interfaces (untested) 2012-09-08 00:21:02 -04:00
f0f17b5b70 add stdnoreturn.h (C11)
features.h contains the fallback logic for pre-C11 compilers
2012-09-08 00:14:25 -04:00
3cd084bb03 TCP_* is in the reserved namespace for tcp.h; make use of that 2012-09-07 23:56:32 -04:00
6951110368 remove unneeded judgemental commentary from ftw.h 2012-09-07 23:55:11 -04:00
c1a9658bd1 default features: make musl usable without feature test macros
the old behavior of exposing nothing except plain ISO C can be
obtained by defining __STRICT_ANSI__ or using a compiler option (such
as -std=c99) that predefines it. the new default featureset is POSIX
with XSI plus _BSD_SOURCE. any explicit feature test macros will
inhibit the default.

installation docs have also been updated to reflect this change.
2012-09-07 23:13:55 -04:00
c4ea0e3f8e provide loff_t for splice syscall
so far, this is the only actual use of loff_t i've found. some
software, including glib, assumes loff_t must exist if splice exists;
this is a reasonable assumption since the official prototype for
splice uses loff_t, as it always works with 64-bit offsets regardless
of the selected libc off_t size. i'm using #define for now rather than
a typedef to make it easy to define in other headers if necessary
(like the LFS64 ugliness), but it may be necessary to add it to
alltypes.h eventually if other functions end up needing it.
2012-09-06 23:49:44 -04:00