Commit Graph
51 Commits
Author SHA1 Message Date
rofl0r 9947ed5c20 getifaddrs: implement proper ipv6 netmasks 2013-04-09 16:52:13 +02:00
rofl0r 338cc31c4b getifaddrs: remove unused label 2013-04-06 00:04:52 +02:00
rofl0r 4af3ea789a getifaddrs: use if_nameindex to enumerate interfaces 2013-04-05 22:47:30 +02:00
rofl0r 69a1983872 getifaddrs: one less indent level 2013-04-05 22:08:03 +02:00
rofl0r c82f53f67c getifaddrs: less malloc 2013-04-05 22:06:35 +02:00
rofl0r b3792c8891 include/ifaddrs.h: add prototypes for get/freeifaddrs 2013-04-05 19:59:40 +02:00
rofl0r 202db37a6f add getifaddrs
supports ipv4 and ipv6, but not the "extended" usage where
usage statistics and other info are assigned to ifa_data members
of duplicate entries with AF_PACKET family.
2013-04-05 19:36:51 +02:00
rofl0r 5ffe494050 net/if.h: add some missing IFF_ constants 2013-04-05 19:26:23 +02:00
rofl0r baec93cb58 add arpa/tftp.h 2013-04-05 02:32:51 +02:00
rofl0r 47cf4919fc re-add useconds_t
this type was removed back in 5243e5f160 ,
because it was removed from the XSI specs.
however some apps use it.
since it's in the POSIX reserved namespace, we can expose it
unconditionally.
2013-04-02 04:58:14 +02:00
rofl0r 82aad3a317 add arpa/nameser_compat.h
the contents of this header are already in arpa/nameser.h
2013-04-02 04:43:53 +02:00
rofl0r da144eec54 make tm_zone etc visible under _GNU_SOURCE 2013-04-02 04:43:53 +02:00
rofl0r a6752eb940 __time_to_tm: initialize tm_zone and tm_gmtoff 2013-04-02 04:43:53 +02:00
rofl0r 8224bdbbed scsci/sg.h: fix usage of undefined macro HZ
this macro is 100 on all archs, at least in userspace, according
to kernel headers.
2013-02-21 21:35:34 +01:00
rofl0r caec662217 add arpa/ftp.h 2013-02-21 21:35:26 +01:00
rofl0r 526900484c arm: add __aeabi_atexit()
arm eabi requires this symbol for static C++ dtors.
usually it is provided by libstdc++, but when a C++ program
doesn't use the std lib (free-standing), the libc has to provide
it.
this was encountered while building transmission, which
depends on such a C++ library (libutp).

this function is nearly identical to __cxa_atexit, but it has the
order of argumens swapped for "performance reasons".
see page 25 of

 http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf

there are other aeabi specific C++ support functions missing, but
it is not clear yet that GCC makes use of them so we omit them for
the moment.
2013-02-06 22:46:19 +01:00
rofl0r 158f721adc Makefile: make it possible to build arch specific C files 2013-02-06 02:40:22 +01:00
rofl0r c50925071c make some arrays const
this way they'll go into .rodata, decreasing memory pressure.
2013-02-02 03:19:25 +01:00
rofl0r d84923d89e setjmp.h: add struct tag for sigjmp_buf (GCC C++ compatibility)
the anonymous struct typedef with array notation breaks with
GCC in C++ mode:

error: non-local function 'static<anonymous struct>
(& boost::signal_handler::jump_buffer())[1]' uses anonymous type

this is a known GCC issue, as search results for that error msg
suggest.

since this is hard to work around in the calling C++ code, a
fix in musl is preferable.
2013-01-04 20:36:34 +01:00
rofl0r 2ba3f44db5 add legacy header values.h
some programs (procps, babl) expect it, and it doesn't seem to
cause any harm to just add it.
it's small and straightforward.

since math.h also defines MAXFLOAT, we undef it in both places,
before defining it.
2013-01-04 20:36:34 +01:00
rofl0r 87781ac64c time.h: add BSD aliases for otherwise internal struct tm members 2013-01-04 20:36:34 +01:00
rofl0r e895ddc0cd wait.h: add linux specific, thread-related waitpid() flags
these flags are needed in order to be able to handle lwp id's
which the kernel returns after clone() calls for new threads
via ptrace(PTRACE_GETEVENTMSG).

fortunately, they're the same for all archs and in the reserved
namespace.
2013-01-04 20:36:34 +01:00
rofl0r 2c1f8fd5da __assert_fail(): remove _Noreturn, to get proper stacktraces
for _Noreturn functions, gcc generates code that trashes the
stack frame, and so it makes it impossible to inspect the causes
of an assert error in gdb.

abort() is not affected (i have not yet investigated why).
2013-01-04 20:36:34 +01:00
rofl0r 3159e2fc81 socket.h: add SO_(SND/RCV)BUFFORCE to generic block 2012-12-19 19:02:22 +01:00
rofl0r 36d7303878 add inet_network (required for wine) 2012-12-19 07:32:38 +01:00
rofl0r 3bb167b338 x86_64/bits/signal.h: fix typo in REG_CSGSFS 2012-12-19 06:09:57 +01:00
rofl0r 26cf9c3c6b link.h: expose glibc/svr4 dynlinker debugging glue
this is already implemented in the dynliker (see struct debug),
but was not exposed.
we need it to do so to make wine happy...
2012-12-19 05:08:13 +01:00
rofl0r 6bffcc2335 fix sigorset/sigandset: _NSIG/8 is the size in bytes 2012-12-06 22:48:46 +01:00
rofl0r e00e07f664 fix F_DUPFD_CLOEXEC being defined twice 2012-12-06 22:45:56 +01:00
rofl0r 30d2c1f5bf sigandset/sigorset: do not check for NULL pointers.
that way it's consistent with existing sig* functions, and saves
some code size.
2012-12-06 22:14:37 +01:00
rofl0r 4ab26cc34c fixup sigandset 2012-12-06 21:50:37 +01:00
rofl0r e34d967c3e fixup for fcntl.h changes 2012-12-06 21:43:00 +01:00
rofl0r b6f75ab07f add arch_prctl syscall (amd64/x32 only) 2012-12-06 21:12:24 +01:00
rofl0r 6fb88a955a add personality syscall 2012-12-06 21:01:06 +01:00
rofl0r a1990e1e83 add sigandset and sigorset (needed for qemu) 2012-12-06 20:51:32 +01:00
rofl0r 0182c287ca add struct msgbuf to sys/msg.h 2012-12-06 20:27:54 +01:00
rofl0r 6bf0fdbdfc unistd.h: fix wrong type for gid_t argument
the prototype is defined with const gid_t* rather than const gid_t[].
it was already correctly defined in grp.h.
2012-12-06 20:27:54 +01:00
rofl0r f1bb78343a ipc.h: fix gnu aliases for key and seq in struct ipc_perm
the macro was the wrong way round, additionally GNU defines
__ prefixed versions, which are used by qemu.
2012-12-06 20:27:54 +01:00
rofl0r 7aec71c411 add obsolete futimesat()
this function is obsolete, however it's available as a syscall
and as such qemu userspace emulation tries to forward it to the
host kernel.
2012-12-06 20:27:54 +01: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 120e402de6 fcntl.h: add some linux-specific F_ macros
thankfully these are all generic across archs.
the DN_ macros are for usage with F_NOTIFY.
2012-12-06 17:48:16 +01:00
rofl0r 3d3903fa5b tcp.h: add SOL_TCP, analoguous to udp.h 2012-12-06 17:02:19 +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
rofl0r 2df4f6f17b fix invalid usage of mcontext_t in powerpc signal.h 2012-11-21 06:24:05 +01:00
rofl0r 3fae236e00 powerpc: handle syscall error in clone.
sigsetjmp: store temporaries in jmp_buf rather than on stack.
2012-11-19 16:58:09 +01: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
rofl0r 3bb6bd8580 fix powerpc termios.h and ioctl.h 2012-11-16 04:55:52 +01:00
rofl0r 1c8eb8bad7 PPC port cleaned up, static linking works well now. 2012-11-13 19:12:25 +01:00