Commit Graph

698 Commits

Author SHA1 Message Date
Rich Felker ca52e34767 avoid setting FILE lock count when not using flockfile
for now this is just a tiny optimization, but later if we support
cancellation from __stdio_read and __stdio_write, it will be necessary
for the recusrive lock count to be zero in order for these functions
to know they are responsible for unlocking the FILE on cancellation.
2011-09-21 21:30:45 -04:00
Rich Felker 319df20bc9 gnu search.h has struct qelem... 2011-09-21 21:01:56 -04:00
Rich Felker 4a08c85111 release notes for 0.8.3 2011-09-21 20:24:12 -04:00
Rich Felker 0b6eb2dfb2 update syscalls with off_t arguments to handle argument alignment, if needed
the arm syscall abi requires 64-bit arguments to be aligned on an even
register boundary. these new macros facilitate meeting the abi
requirement without imposing significant ugliness on the code.
2011-09-21 20:11:10 -04:00
Rich Felker d30c331d1f new gcc wrapper now supports pre-4.4 gcc versions and is more robust 2011-09-21 19:40:55 -04:00
Rich Felker 7dd86ec168 new installation guide with alternate and primary libc setups 2011-09-21 19:39:40 -04:00
Rich Felker fd9e01e92a fix some header typos 2011-09-20 20:02:48 -04:00
Rich Felker d23a543d8a make stdbool.h conform to c99 2011-09-20 14:51:56 -04:00
Rich Felker 2318207adc fix incorrect include guard in mqueue.h 2011-09-20 12:14:06 -04:00
Rich Felker 246e15c0dc fix statvfs.c to match new fsid_t definition 2011-09-20 11:18:13 -04:00
Rich Felker 32b82cf5cd fix the fsid_t structure to match name of __val
this is a case of poorly written man pages not matching the actual
implementation, and why i hate implementing nonstandard interfaces
with no actual documentation of how they're intended to work.
2011-09-20 11:16:27 -04:00
Rich Felker 03a8362930 fix broken siginfo_t with _GNU_SOURCE defined
this bug was introduced in a recent patch. the problem we're working
around is that broken GNU software wants to use "struct siginfo"
rather than "siginfo_t", but "siginfo" is not in the reserved
namespace and thus not legal for the standard header to use.
2011-09-20 10:58:18 -04:00
Rich Felker 114c80f141 fix the definition of struct statvfs to match lsb abi
at the same time, make struct statfs match the traditional definition
and make it more useful, especially the fsid_t stuff.
2011-09-19 23:35:48 -04:00
Rich Felker 8c07f6eac8 add some more siginfo aliases broken software expects... 2011-09-19 22:27:02 -04:00
Rich Felker f780ac5baf cleanup redundancy in bits/signal.h versions 2011-09-19 20:02:12 -04:00
Rich Felker 224c7a376a fix the type of wchar_t on arm; support wchar_t varying with arch
really wchar_t should never vary, but the ARM EABI defines it as an
unsigned 32-bit int instead of a signed one, and gcc follows this
nonsense. thus, to give a conformant environment, we have to follow
(otherwise L""[0] and L'\0' would be 0U rather than 0, but the
application would be unaware due to a mismatched definition for
WCHAR_MIN and WCHAR_MAX, and Bad Things could happen with respect to
signed/unsigned comparisons, promotions, etc.).

fortunately no rules are imposed by the C standard on the relationship
between wchar_t and wint_t, and WEOF has type wint_t, so we can still
make wint_t always-signed and use -1 for WEOF.
2011-09-19 17:39:51 -04:00
Rich Felker 089aeb08a0 fix incorrect long double parameters on arm (and other future ports)
this was the cause of crashes in printf when attempting to print
floating point values.
2011-09-19 16:59:10 -04:00
Rich Felker 53431b091b fix broken multi-inclusion guard in sys/reg.h 2011-09-19 11:56:09 -04:00
Rich Felker d960d4f2cb initial commit of the arm port
this port assumes eabi calling conventions, eabi linux syscall
convention, and presence of the kernel helpers at 0xffff0f?0 needed
for threads support. otherwise it makes very few assumptions, and the
code should work even on armv4 without thumb support, as well as on
systems with thumb interworking. the bits headers declare this a
little endian system, but as far as i can tell the code should work
equally well on big endian.

some small details are probably broken; so far, testing has been
limited to qemu/aboriginal linux.
2011-09-18 16:44:54 -04:00
Rich Felker 4f4bf0ad2e disable dynamic linking/loading code in static libc builds, for now
it does not work, but some configure scripts will falsely detect
support then generate programs that crash when they call dlopen.
2011-09-18 16:42:06 -04:00
Rich Felker b0c088ee55 cleanup more bits cruft (sysmacros and socket) 2011-09-18 16:34:13 -04:00
Rich Felker ca8373dfcf more bits junk (tcp.h) 2011-09-18 15:39:52 -04:00
Rich Felker c8175666f2 move invariant netinet/in.h stuff out of bits/in.h 2011-09-18 15:31:44 -04:00
Rich Felker 3f72cdac73 overhaul clone syscall wrapping
several things are changed. first, i have removed the old __uniclone
function signature and replaced it with the "standard" linux
__clone/clone signature. this was necessary to expose clone to
applications anyway, and it makes it easier to port __clone to new
archs, since it's now testable independently of pthread_create.

secondly, i have removed all references to the ugly ldt descriptor
structure (i386 only) from the c code and pthread structure. in places
where it is needed, it is now created on the stack just when it's
needed, in assembly code. thus, the i386 __clone function takes the
desired thread pointer as its argument, rather than an ldt descriptor
pointer, just like on all other sane archs. this should not affect
applications since there is really no way an application can use clone
with threads/tls in a way that doesn't horribly conflict with and
clobber the underlying implementation's use. applications are expected
to use clone only for creating actual processes, possibly with new
namespace features and whatnot.
2011-09-18 10:14:37 -04:00
Rich Felker 455fc98389 release notes for 0.8.2 2011-09-17 11:41:11 -04:00
Rich Felker d5fd1fa485 dummy implementation of set_thread_area
eventually we may have a working "generic" implementation for archs
that don't need anything special. in any case, the goal of having
stubs like this is to allow early testing of new ports before all the
details needed for threads have been filled in. more functions like
this will follow.
2011-09-17 11:37:46 -04:00
Rich Felker 471c6067d9 fix assumptions that char is signed 2011-09-16 14:39:15 -04:00
Rich Felker 2b71a4d1df fix more instances of old a_xchg (use new a_swap name) 2011-09-16 14:33:51 -04:00
Rich Felker 813d37839b use a_swap rather than old name a_xchg 2011-09-16 14:29:24 -04:00
Rich Felker 5b91c22335 fix generic sigsetjmp (unused anyway) pointer signedness error 2011-09-16 12:44:39 -04:00
Rich Felker 144c951b0d fix idiotic const-correctness error in lio_listio
i blame this one on posix for using hideous const-qualified double
pointers which are unusable without hideous casts.
2011-09-16 12:08:20 -04:00
Rich Felker d431d4546e fix ptrace (maybe) 2011-09-16 10:13:00 -04:00
Rich Felker 71f7a3c2ce implement ptrace syscall wrapper (untested) 2011-09-15 13:03:13 -04:00
Rich Felker d1d141c5f1 0.8.1 release notes 2011-09-14 19:11:15 -04:00
Rich Felker a949257404 remove incorrectly-made-visible internal dst offset variable 2011-09-14 09:37:01 -04:00
Rich Felker 7c131a3108 fix inconsistent signature for aio_error 2011-09-14 09:36:38 -04:00
Rich Felker 4da289e1b3 fix return types for aio_read and aio_write again
previous fix was backwards and propagated the wrong type rather than
the right one...
2011-09-13 21:21:53 -04:00
Rich Felker 13cd969552 fix various errors in function signatures/prototypes found by nsz 2011-09-13 21:09:35 -04:00
Rich Felker 5e9deea003 fix cruft left in release notes 2011-09-13 16:12:57 -04:00
Rich Felker fd408d27a0 fix prototypes for aio_read and aio_write 2011-09-13 15:39:58 -04:00
Rich Felker 0f1ef81462 add missing posix_spawnattr_init/destroy functions 2011-09-13 14:45:59 -04:00
Rich Felker 801b311a5b 0.8.0 release 2011-09-13 13:41:40 -04:00
Rich Felker 28af39fe42 remove some stray trailing space characters 2011-09-13 09:53:41 -04:00
Rich Felker fb80e047cc implement gnu sigisemptyset 2011-09-12 00:00:30 -04:00
Rich Felker ce17ea6f2c add prototypes for GNU *_unlocked stdio functions
actually these are just weak aliases for the normal locking versions
right now, and they will probably stay that way since making them
lock-free without slowing down the normal versions would require
significant code duplication for no benefit.
2011-09-11 22:50:02 -04:00
Rich Felker a6540174be add dummied strverscmp (obnoxious GNU function)
programs that use this tend to horribly botch international text
support, so it's questionable whether we want to support it even in
the long term... for now, it's just a dummy that calls strcmp.
2011-09-11 22:45:56 -04:00
Rich Felker d4045a1683 declare alloca in stdlib.h when _GNU_SOURCE is defined 2011-09-11 22:43:57 -04:00
Rich Felker 8fe5fa56ee fix serious bug in pthread_join
on spurious wakeups/returns from __timedwait, pthread_join would
"succeed" and unmap the thread's stack while it was still running. at
best this would lead to SIGSEGV when the thread resumed execution, but
in the worst case, the thread would later resume executing on top of
another new thread's stack mapped at the same address.

spent about 4 hours tracking this bug down, chasing rare
difficult-to-reproduce stack corruption in a stress test program.
still no idea *what* caused the spurious wakeups; i suspect it's a
kernel bug.
2011-09-11 12:35:41 -04:00
Rich Felker eb351a9e63 fix pthread_join wait call: thread termination tid futex is not private
this seeme to be the bug that prevented enabling of private futex
support. i'm going to hold off on switching to private futexes until
after the next release, and until i get a chance to audit all
wait/wake calls to make sure they're using the correct private
argument, but with this change it should be safe to enable private
futex support.
2011-09-09 23:10:27 -04:00
Rich Felker b4de6f93ae implement POSIX asynchronous io
some features are not yet supported, and only minimal testing has been
performed. should be considered experimental at this point.
2011-09-09 01:07:38 -04:00