Commit Graph

50 Commits

Author SHA1 Message Date
jD91mZM2 1fd9a5f249 Moooore fixes :| 2018-06-30 12:15:51 +02:00
jD91mZM2 234632d319 Workaround compilation errors 2018-06-30 09:19:06 +02:00
Paul Sajna 5c5e237042 Exec Functions (again) (again) 2018-06-28 19:24:04 +00:00
jD91mZM2 a6ffd2cc46 Update inttypes to match the revert of ints 2018-06-27 08:08:14 +02:00
jD91mZM2 3927b0ab44 Revert int definitions 2018-06-26 14:10:20 +02:00
jD91mZM2 0776de1ae6 Fix inttypes 2018-06-26 11:10:44 +02:00
jD91mZM2 257040e164 Fix a few stat-related things 2018-06-26 10:47:48 +02:00
jD91mZM2 ad324a0e4d Use global_asm for setjmp instead 2018-06-26 10:21:44 +02:00
jD91mZM2 feed73ffcc inttypes 2018-06-26 09:51:07 +02:00
jD91mZM2 441bf9f00b Add the few last things to get gcc_complete working 2018-06-25 11:43:44 +02:00
jD91mZM2 72e9525828 Add U?INT([0-9]+)_LEAST([0-9]+)_MIN/MAX macros 2018-06-24 14:27:42 +02:00
jD91mZM2 3e67314b97 Fix openlibm & fenv and add more integer types 2018-06-24 14:12:24 +02:00
jD91mZM2 4e99b55417 Implement basic setjmp using musl's awesome existing code 2018-06-23 17:38:10 +02:00
jD91mZM2 ea24699798 Fix undefined behavior
Transmuting from an immutable to a mutable reference is undefined
behavior in Rust, with the exception of UnsafeCell which tells the
optimizer to not draw too many conclusions. Sadly UnsafeCell::get cannot
yet be used in statics (see https://github.com/rust-lang/rust/issues/51718),
so this works around that by making the statics into functions and
making C macros to call those.
2018-06-22 21:17:44 +02:00
jD91mZM2 996445a6a3 Add empty locale functions 2018-06-22 14:54:10 +02:00
jD91mZM2 91221645c5 Add *scanf to header 2018-06-21 18:52:41 +02:00
Jasen Borisov 06a8d5d89d sys_wait: implement C macros properly
Remove the broken Rust functions and instead provide C macros in a
`include/bits` header. The C macros were taken from musl.
2018-06-20 19:40:38 +01:00
Jeremy Soller 1b653c4e60 Update ralloc, fix invalid c++ names 2018-06-20 08:48:56 -06:00
Jeremy Soller 08091ab2a9 Merge branch 'stat' of https://github.com/sajattack/relibc 2018-04-26 20:12:57 -06:00
Jeremy Soller dabd8dc6a2 Move memory handling into string, do not use compiler_builtins for memory handling 2018-03-27 21:28:48 -06:00
Jeremy Soller 79d05d7eda Build variadic functions as part of relibc 2018-03-27 21:13:11 -06:00
Jeremy Soller b849165438 Fix MAX_C macros 2018-03-27 20:33:04 -06:00
Jeremy Soller afdc80629f Fix Makefile spurious rebuilds
Add mem* functions to stdio
Add constant int functions
2018-03-27 20:14:22 -06:00
Paul Sajna c7e9ec8ae2 fix 2018-03-26 16:47:12 -07:00
Dan Robertson f1d802dc1e signal: sigaction struct should not be a typedef
The sigaction struct should not be a typedef, but the sigset_t struct
should be a typedef.
2018-03-15 01:07:44 +00:00
Jeremy Soller d6e210b1fd Merge branch 'signal' of https://github.com/dlrobertson/relibc into dlrobertson-signal 2018-03-13 19:54:49 -06:00
Jeremy Soller 3e354aed04 Merge branch 'fix_includes' of https://github.com/dlrobertson/relibc into dlrobertson-fix_includes 2018-03-11 21:22:07 -06:00
Dan Robertson cc5669939e Fix include in resource.h and add SIZE_MAX
The rusage struct makes use of the timeval structure. Make sure to
include sys/time.h so that the type is known.

Add SIZE_MAX to stdint.h

sys/resource expects the defined structures to not be defined with a
typedef.
2018-03-12 02:38:07 +00:00
Dan Robertson 50eab4369d Add signal.h
Create stubs for signal.h
2018-03-11 21:36:02 +00:00
Paul Sajna bc98f6a029 git rm include/sys/stat.h 2018-03-11 11:22:10 -07:00
Dan Robertson 3699b53ba2 float: Add crate for float.h
Add a crate with stubbed functions for the float.h header.
2018-03-10 21:16:55 +00:00
Dan Robertson 2f718d40d6 mman: mman.h should be located at sys/mman.h
- Update target location of mman.h to sys/mman.h
 - Add more types to sys/type.h
2018-03-10 19:14:16 +00:00
Dan Robertson 75920d2c12 Add implementations of sprintf and snprintf
Add implementations of sprintf and snprintf so that we can get a bit
closer to compiling libc-test.
2018-03-10 02:33:03 +00:00
Paul Sajna 4d4ab1a75f fix and test 2018-03-09 05:18:21 -08:00
Jeremy Soller 96358469a4 Merge branch 'master' into master 2018-03-08 20:17:08 -07:00
MggMuggins c291632492 Imp va_arg for fcntl; fcntl test 2018-03-08 20:56:50 -06:00
Paul Sajna 799c8828c2 mkdir and rmdir 2018-03-08 19:45:16 -07:00
Dan Robertson e306e3f855 fcntl: open should use a va_list
The current implementation of open requires the user to pass all three
args to the function. It should use a va_list and allow a user to
provide only the filename and flags.
2018-03-09 02:24:25 +00:00
Jeremy Soller f01c669771 Remove thread local from errno, for now 2018-03-07 20:37:22 -07:00
Jeremy Soller 85b80d0fe5 Fix errno.h, add -no-pie to tests Makefile 2018-03-07 20:31:18 -07:00
Jeremy Soller 851e4d399f Fix errno.h definition 2018-03-07 19:46:23 -07:00
Paul Sajna 93ddcca294 add test for errno 2018-03-07 18:36:18 -08:00
Jeremy Soller a9f2e9a9a7 Add template 2018-03-03 20:48:37 -07:00
Jeremy Soller 5520526bef Implement printf (very simple version) 2018-03-03 19:47:01 -07:00
Jeremy Soller bf987098dc Use openlibm 2018-03-03 17:56:53 -07:00
Jeremy Soller e30dec7124 WIP: stdio.h 2018-03-03 15:15:50 -07:00
Jeremy Soller 2aff4d41dd Implement argument handling, add string.h 2018-03-03 14:55:54 -07:00
Jeremy Soller 78e421cb72 Implement some functions on Linux 2018-03-03 14:31:28 -07:00
Jeremy Soller d64dba1c1e Use patched cbindgen, implement stdbool and stdint 2018-03-03 13:05:43 -07:00
Jeremy Soller a9aae80ae0 WIP: Define common types 2018-03-03 10:08:16 -07:00