Commit Graph

9 Commits

Author SHA1 Message Date
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 1d3c276807 don't define wchar_t on c++
it's a keyword in c++ (wtf). i'm not sure this is the cleanest
solution; it might be better to avoid ever defining __NEED_wchar_t on
c++. but in any case, this works for now.
2011-10-15 00:28:49 -04:00
Rich Felker e6d765a8b1 fix fcntl O_* flags for arm
no idea why these 4 are permuted and the rest are standard/generic
2011-10-05 00:26:49 -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 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 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 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