Jeremy Soller
3c2121d4e0
Do not require prefix for hex
2018-10-16 18:03:21 -06:00
jD91mZM2
460f57b37f
Disallow execve on non-executable interpreted files
2018-10-15 17:36:41 +02:00
jD91mZM2
75c5c04bee
Implement a proper mutex type for future usage
2018-10-15 15:24:14 +02:00
jD91mZM2
23fe526c55
Fix feof and ferror
2018-10-14 15:57:42 +02:00
jD91mZM2
057d23908a
Merge branch 'bugfix/netdb-gethostent' into 'master'
...
Don't drop the host aliases pointer vector in `gethostent`
Closes #130
See merge request redox-os/relibc!170
2018-10-13 15:02:23 +00:00
jD91mZM2
edb95246d4
Fix bug in strncasecmp
2018-10-13 16:55:21 +02:00
Jeremy Soller
e4d87a101a
Merge branch 'printf' into 'master'
...
Implement almost all of printf
See merge request redox-os/relibc!171
2018-10-13 14:14:27 +00:00
jD91mZM2
63882684b2
Implement almost all of printf
2018-10-13 14:20:54 +02:00
Benedikt Rascher-Friesenhausen
49259d3f01
Don't drop the host aliases pointer vector in gethostent
...
There are pointers to this vector in `HOST_ENTRY` so we must keep it around for
as long as `HOST_ENTRY` exists.
2018-10-11 20:59:54 +02:00
jD91mZM2
b517629371
Fix timeradd
...
wow i am stupid for writing this code
2018-10-11 19:52:54 +02:00
jD91mZM2
1f3154b45c
Invoke constructors and destructors
...
Huge thanks to @xtibor for both discovering that this was still an issue, and also providing information with how to fix it
2018-10-11 16:59:49 +02:00
jD91mZM2
116cbda8d2
Merge branch 'test-ctor-dtor' into 'master'
...
Add tests for constructors and destructors
See merge request redox-os/relibc!169
2018-10-10 14:06:41 +00:00
Tibor Nagy
aee3f68117
Add tests for constructors and destructors
2018-10-09 20:32:27 +02:00
jD91mZM2
f516ff72d8
Merge branch 'regoff_t' into 'master'
...
Move regoff_t to regex.h
See merge request redox-os/relibc!168
2018-10-09 14:49:53 +00:00
jD91mZM2
0469c0c2c6
Add tests for memcmp and fix a teeny tiny bug
2018-10-09 16:47:57 +02:00
Tibor Nagy
0f5fa8c9d4
Move regoff_t to regex.h
2018-10-09 16:43:34 +02:00
jD91mZM2
3f4fbf9084
Merge branch 'feature/optimise-memcmp' into 'master'
...
Optimise `memcmp` for speed
See merge request redox-os/relibc!167
2018-10-09 14:20:06 +00:00
Benedikt Rascher-Friesenhausen
8e2b7c11b4
Replace i32 with c_int in memcmp
...
As per the comments from jD91mZM2 on the merge request.
2018-10-07 17:40:30 +02:00
jD91mZM2
91675b5bc8
realpath on redox: don't forget the nul terminator
2018-10-07 15:12:41 +02:00
jD91mZM2
fba3bf5161
Merge branch 'assert' into 'master'
...
Make assert more hygienic
See merge request redox-os/relibc!166
2018-10-07 12:50:56 +00:00
jD91mZM2
758f681590
Implement scandir
2018-10-07 14:43:54 +02:00
jD91mZM2
3c8cb95b80
Cleanup strcasecmp
2018-10-07 13:02:05 +02:00
jD91mZM2
0de7d30656
Fix S_IS*
...
For some reason, C handles `==` before `&`.
So `a & b == c` is the same thing as `a & (b == c)`.
2018-10-07 13:01:59 +02:00
jD91mZM2
028378b8bf
Fix double close
...
Accidentally made file references not count as references and therefore also close the fd. My bad.
2018-10-07 10:54:37 +02:00
jD91mZM2
418a960f3b
Implement realpath
2018-10-07 10:32:51 +02:00
Benedikt Rascher-Friesenhausen
e10a346356
Optimise memcmp for speed
...
I saw that in other parts of the `string` module iterations over `usize` were
used to increase iteration speed. In this patch I apply the same logic to
`memcmp`. With this change I measured a 7x speedup for `memcmp` on a ~1MB
buffer (comparing two buffers with the same content) on my machine (i7-7500U),
but I did not do any real world benchmarking for the change. The increase in
speed comes with the tradeoff of both increased complexity and larger generated
assembly code for the function.
I tested the correctness of the implementation by generating two randomly filled
buffers and comparing the `memcmp` result of the old implementation against this
new one.
I ran the tests and currently currently three of them fail:
- netdb (fails to run)
- stdio/rename (fails to verify)
- unistd/pipe (fails to verify)
They do so though regardless of this change, so I don't think they are related.
2018-10-07 10:25:19 +02:00
jD91mZM2
26d629674a
Implement strcasestr
2018-10-06 17:37:50 +02:00
jD91mZM2
9d56ce42c6
Implement timer* macros, and GNU's getopt_long
2018-10-06 16:46:35 +02:00
Tibor Nagy
614b2f5103
Make assert more hygienic
2018-10-06 14:55:06 +02:00
jD91mZM2
baddbb98d5
Don't reinvent the wheel in strings.h
2018-10-05 19:33:41 +02:00
jD91mZM2
1acc2a1a32
Initial regex.h implementation
2018-10-05 18:07:43 +02:00
jD91mZM2
dfa3845c33
Make fread/fwrite retry their respective operations
2018-10-02 18:47:42 +02:00
jD91mZM2
6dcc8ee8d9
Implement strtof
2018-10-02 18:47:42 +02:00
Jeremy Soller
aec6a48ca4
Merge branch 'termios-baudrate' into 'master'
...
Add termios baud rate functions
See merge request redox-os/relibc!165
2018-09-29 21:27:31 +00:00
Tibor Nagy
db4452e98b
Add termios baud rate functions
2018-09-29 22:52:12 +02:00
jD91mZM2
b22d386177
Re-add EOF to bits header
...
cbindgen can't handle negative numbers, see https://github.com/eqrion/cbindgen/issues/205
2018-09-29 20:02:37 +02:00
jD91mZM2
dd711f4dee
Fix bug in fread
...
Bug discovered by @xTibor. Test and input data provided by him.
2018-09-29 15:04:58 +02:00
jD91mZM2
0451fac66c
Delete RawFile in favor of File
2018-09-26 19:40:39 +02:00
jD91mZM2
d365813c90
Merge branch 'core-io' into 'master'
...
Rewrite IO to use core-io library
See merge request redox-os/relibc!164
2018-09-26 16:56:29 +00:00
jD91mZM2
4f187efc9b
Change BUFSIZ type to work with cbindgen
2018-09-26 18:44:04 +02:00
jD91mZM2
243ce18ecd
Implement ftell
2018-09-26 17:48:46 +02:00
jD91mZM2
21559bb503
Fix redox compilation
2018-09-26 16:40:23 +02:00
jD91mZM2
afc1ff134a
Rewrite IO to use core-io library
2018-09-26 16:13:09 +02:00
Jeremy Soller
aff35892be
Add fs module
2018-09-24 21:40:40 -06:00
Jeremy Soller
7f14fcdee0
Remove c_str functions, replace with CStr
2018-09-24 21:08:29 -06:00
Jeremy Soller
ef9fee5a2b
Prepare for use of Write trait by renaming Write to WriteByte
2018-09-24 20:31:06 -06:00
Jeremy Soller
9eef8d7e2d
Add core_io
2018-09-24 20:19:37 -06:00
Jeremy Soller
b309cd832d
Add getopt and machine/endian.h
2018-09-24 14:45:36 -07:00
jD91mZM2
d659377b24
VERY basic crti/crtn
2018-09-23 21:30:13 +02:00
jD91mZM2
6d99915154
Use RAII for file locking in stdio
2018-09-23 20:40:48 +02:00