Commit Graph

189 Commits

Author SHA1 Message Date
Rich Felker 147f355cb6 apparently gnu caddr_t is supposed to be char *, not unsigned long
this type should never be used anyway, but some old junk uses it..
2012-02-01 14:12:19 -05:00
Rich Felker 96e0aca4d5 fix utmp.h mess, try 2 2012-02-01 14:10:38 -05:00
Rich Felker 108fdd3318 fix previous utmp.h junk commit 2012-01-31 17:10:02 -05:00
Rich Felker fa3bbbd453 add some missing junk in utmp.h 2012-01-31 14:39:17 -05:00
Rich Felker 5e9314ff03 add fgetpwent (nonstandard function)
based on patch by Jeremy Huntwork
2012-01-29 11:54:18 -05:00
Rich Felker 4619901ec4 add linux setfs[ug]id syscall wrappers
patch by Jeremy Huntwork
2012-01-28 21:09:50 -05:00
Rich Felker c3db56c4cb remove useless "extern" keywords in headers 2012-01-26 10:53:37 -05:00
Rich Felker 8eb9a3afba fix typo in FPE_FLTUND definition, signal.h 2012-01-25 15:30:42 -05:00
Rich Felker 6a193804a8 add MIN/MAX macros to sys/param.h
this is a nonstandard junk header anyway, so just do what apps expect..
2012-01-24 22:51:27 -05:00
Rich Felker 477e72ac4a add legacy futimes and lutimes functions
based on patch by sh4rm4. these functions are deprecated; futimens and
utimensat should be used instead in new programs.
2012-01-24 19:50:44 -05:00
Rich Felker 26f38328d6 add prlimit syscall wrapper 2012-01-20 22:10:47 -05:00
Rich Felker 4e3df7be8f fix __cplusplus extern "C" closing brace in pty.h (typo?) 2011-11-10 21:01:24 -05:00
Rich Felker 3ed8c9f2df fix all missing instances of __cplusplus checks/extern "C" in headers
patch by Arvid Picciani (aep)
2011-11-10 20:40:06 -05:00
Rich Felker 42976cee2d add some missing GNU FNM_* extensions to the header
note that none of these are implemented, and programs depending on
them may break... patch by sh4rm4
2011-10-17 12:24:23 -04:00
Rich Felker 03860303c2 fix some details in ugly stuff that doesn't belong in libc
patches by sh4rm4, presumably needed to make gdb or some similar junk
happy...
2011-10-17 12:23:04 -04:00
Rich Felker 73f5ff4e86 make [U]INTn_C() macros have the right type...
...and still be valid in #if directives.
2011-10-04 11:50:35 -04:00
Rich Felker f0a8d60d32 stupid typo (caused by rather ugly spelling in POSIX..) in aio 2011-09-28 11:36:11 -04:00
Rich Felker 7e14ed1360 fix ctype macros to cast argument to (unsigned) first
issue reported by nsz, but it's actually not just pedantic. the
functions can take input of any arithmetic type, including floating
point, and the behavior needs to be as if the conversion implicit in
the function call took place.
2011-09-26 18:56:56 -04:00
Rich Felker fd142e5ec4 cleanup various minor issues reported by nsz
the changes to syscall_ret are mostly no-ops in the generated code,
just cleanup of type issues and removal of some implementation-defined
behavior. the one exception is the change in the comparison value,
which is fixed so that 0xf...f000 (which in principle could be a valid
return value for mmap, although probably never in reality) is not
treated as an error return.
2011-09-26 00:59:28 -04:00
Rich Felker c41a76f58c FD_ISSET must return an int. this is the easiest way.
casting to int would not be correct because high bits could be lost.
mapping the high bits down onto low bits would be costlier in the
common case where the result is just used in a conditional. changing
the type of the bit array elements to int would permute the order of
the bit array on 64-bit big endian systems, so that's not an option
either.
2011-09-23 22:24:33 -04:00
Rich Felker 1587224ed6 sys/user.h may need stdint.h 2011-09-23 14:24:57 -04:00
Rich Felker 81a5577a86 fix missing SIG_DFL, SIG_IGN, SIG_ERR without posix in signal.h 2011-09-21 22:25:31 -04:00
Rich Felker 319df20bc9 gnu search.h has struct qelem... 2011-09-21 21:01:56 -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 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 53431b091b fix broken multi-inclusion guard in sys/reg.h 2011-09-19 11:56:09 -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 71f7a3c2ce implement ptrace syscall wrapper (untested) 2011-09-15 13:03:13 -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 fd408d27a0 fix prototypes for aio_read and aio_write 2011-09-13 15:39:58 -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 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
Rich Felker d4fa6f0e08 implement fmemopen
testing so far has been minimal. may need further work.
2011-09-03 23:26:17 -04:00
Rich Felker 1461e02757 implement open_wmemstream
not heavily tested, but it seems to be correct, including the odd
behavior that seeking is in terms of wide character count. this
precludes any simple buffering, so we just make the stream unbuffered.
2011-09-03 19:49:46 -04:00
Rich Felker b158b32a44 implement open_memstream
this is the first attempt, and may have bugs. only minimal testing has
been performed.
2011-09-03 00:45:21 -04:00
Rich Felker adb7093caa fix missing prototypes/wrong signature for psiginfo, psignal 2011-09-02 14:25:43 -04:00