Red Bear OS
32df50c8fa
relibc: add missing POSIX/Linux headers and constants
...
New headers:
- include/sys/ioccom.h: Linux UAPI ioctl encoding macros (_IO/_IOR/_IOW/_IOWR)
- include/byteswap.h: bswap_16/32/64 inline functions
- src/header/sys_statfs/: struct statfs + statfs()/fstatfs() functions
(delegates to fstatvfs, converts to Linux struct statfs format)
New constants:
- sys_socket: MSG_NOSIGNAL, MSG_PROBE, MSG_CONFIRM, MSG_MORE, MSG_FASTOPEN
- sys_mman: MAP_GROWSDOWN, MAP_DENYWRITE, MAP_EXECUTABLE, MAP_LOCKED, MAP_NONBLOCK
- elf/cbindgen.toml: ELFMAG and SELFMAG #defines in after_includes
These headers eliminate the need for shim patches in libwayland (MSG_NOSIGNAL),
mesa (sys/ioccom.h), qtbase (sys/statfs.h, ELFMAG), pipewire/wireplumber
(byteswap.h, MAP_* flags).
2026-07-10 14:15:18 +03:00
vasilito
4ef7e57571
0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches
2026-07-06 19:13:57 +03:00
Jeremy Soller
1a0edd8eeb
Add program_invocation_short_name
2020-12-23 20:24:04 -07:00
Jeremy Soller
928b18b306
Add sysexits.h
2020-12-23 13:45:25 -07:00
jD91mZM2
b9828bd863
Merge branch 'elf_And_flock' into 'master'
...
Elf and flock
See merge request redox-os/relibc!283
2020-08-12 10:17:59 +00:00
oddcoder
e14b3e09a5
Add elf.h header to relibc
2020-08-08 10:16:50 +02:00
jD91mZM2
e17c6049c6
Fix libgmp compilation
2020-07-15 11:12:59 +02:00
oddcoder
f4d95ce43f
Add sys/select.h to sys/types.h
...
This was triggered by gcc for some reason It included sys/types.h and
assumed sys/select.h to be there. And that seams to be the case in musl.
The problem with relibc here is that sys/types.h is are part of relibc
"include/*.h" files, while sys/select.h is generated by cbindgen. That
makes it impossible to #include select.h in types.h epsecially that
there are files like fcntl.c that uses types.h. They would complain
about missing headers. I fixed this by renaming sys/types.h to
sys/types_internal.h and then generating types.h using cbindgen as well
except for that. however fcntl and dlmalloc can include types_internal
instead of types.h
2020-06-14 22:00:16 +02:00
oddcoder
a125b8be15
Make stdbool.h C++ compatiable
...
The problem here is that _Bool type is not defined in C++ yet this file
is using it. That leads to issues when compiling gcc. I borrowed the
same techniques used in other stdbool.h
2020-06-14 22:00:10 +02:00
no name
c02849dd73
FIX error: right operand of shift expression '(1 << BLA)' is greater than or equal to the precision BLA of the left operand [-fpermissive]
2020-06-02 23:27:15 +02:00
Jeremy Soller
c7910a8754
Add __need_winit_t to wctype.h
2020-05-28 13:43:55 -06:00
oddcoder
4c94dfac00
Add type definition for caddr_t
...
Normally one shouldn't be using this datatype ever, but then someone
have to tell that to gcc folks :(
2020-05-23 16:20:20 +02:00
oddcoder
3a923aa62d
Implement #include<sys/user.h> and #include<sys/procfs.h>
...
This patch implements sys/user.h file that works for both x86_64 as well
as aarch64. This include file is used by sys/procfs.h which is needed
dependency for binutils. There is bug in this patch in aarch64 implementation
which is the lack of f128 implementation in rust, thus we can't create cbinding
for long double.
2020-04-24 22:08:49 +02:00
oddcoder
3ac6ef1848
Adjust stddef.h to be compatiable with other libc(s)
...
I faced many issues when compiling libstdC++-V3 and linking against
relibc mainly:
- Missing types (max_align_t)
- Different types definitions(ptrdiff_t , size_t)
- and the fact that wchar_t is part of standard C++ and it seams that we
canno redefine standard types
2020-03-02 00:06:49 +02:00
oddcoder
a2f2484e45
Add minimal basic features.h resembling musl lib's own
2020-03-01 22:59:39 +02:00
Steve McKay
4859c222e7
Make program_invocation_name modifiable
...
libiconv expects program_invocation_name to be an lvalue
2019-08-17 12:35:43 -04:00
jD91mZM2
aeab6a986d
Fix a few GDB compilation issues
2019-08-12 09:30:05 +02:00
Jeremy Soller
e7d19e2a58
Move SIG_IGN and friends to C in order to define them correctly
2019-08-08 20:06:38 -06:00
jD91mZM2
f389010fff
Initial ptrace compatibility for Redox OS
2019-08-04 19:05:45 +02:00
jD91mZM2
7f702720af
Fix header file generation for ptrace
2019-08-04 19:05:44 +02:00
Mateusz Mikuła
b599c453a0
Remove defines that are generated by new cbindgen from bits
2019-07-18 13:18:00 +02:00
Jeremy Soller
38099fe3d9
Fix definition of errno to match what is used by musl
2019-07-03 19:47:55 -06:00
Mateusz Mikuła
ff94798253
Make errno thread local
2019-07-01 16:51:19 +02:00
Mateusz Mikuła
21a6701528
Rename __assert to __assert_fail
...
This makes relibc more compatible with other libc implementations
2019-05-11 13:50:36 +02:00
Alex Lyon
3584edf199
stdio: implement tempnam() and tmpnam()
2019-04-26 20:39:03 -07:00
Jeremy Soller
2fdca9bd0a
Work around definition of O_NOFOLLOW, and add target for only building and installing headers
2019-04-07 10:11:05 -06:00
Robin Randhawa
9443eef518
Add wint_t definition to stddef.h
...
Without this the relibc tests would break. With this the relibc tests
pass and formerly breaking builds (such as uutils -> onig_sys) pass.
2019-03-03 21:50:13 +00:00
Robin Randhawa
23de2ca7ca
Remove redundant wchar_t and win_t definitions
...
Typically with libc implementations, wchar_t and co are either defined
entirely by the libc or, under libc's arrangement, by headers supplied
by the compiler.
Things like dlmalloc in relibc need these definitions from relibc itself
and that's already already furnished by relibc's stddef.h.
These additional definitions here are redundant and collide with
compiler headers - for example: onig_sys (something that uutils depends
on) breaks. Instead, this patch makes the compiler headers define
things appropriately.
2019-03-03 21:50:04 +00:00
Paul Sajna
e93129b165
Change LONG_BIT definition, fixes #148
2019-02-28 07:42:19 +00:00
Tibor Nagy
7ee59d2fdb
tests: set C11, enable pedantic warnings, fix GCC and Clang warnings
2019-02-20 15:04:47 +01:00
Tibor Nagy
d38a1d0da3
ctype: Implement _tolower, _toupper
2019-02-20 11:49:06 +01:00
Jeremy Soller
b35a4f6372
Add in_systm.h
2019-01-15 20:49:15 -07:00
Jeremy Soller
434cad49ce
Add sysconf
2019-01-13 14:16:51 -07:00
Jeremy Soller
6c0c6dd71b
Fix missing negative flags in netdb.h, add NI_MAXHOST and NI_MAXSERV
2019-01-13 10:34:17 -07:00
Jeremy Soller
7ac3dfaa49
Implement sys_uio, define sockaddr_storage
2019-01-05 13:10:20 -07:00
Jeremy Soller
eef2f4d1f8
Add more netinet/in.h definitions
2019-01-05 12:01:24 -07:00
Jeremy Soller
bd956e5fe4
Force little endian for reals
2019-01-01 07:35:13 -07:00
Robin Randhawa
0842d6504b
aarch64: Fix typo in a jmp_buf preprocessor conditional
2018-12-23 16:04:35 +05:30
Jeremy Soller
e6c866a92d
Undefine complex in fenv.h
2018-12-14 12:50:23 -07:00
Jeremy Soller
74af56d71b
Add statvfs and strtold
2018-12-14 12:00:21 -07:00
Jeremy Soller
0d2332d368
Add more special redox functions
2018-12-13 15:26:03 -07:00
Jeremy Soller
c6d42dd9e3
Use openlibm's fenv.h
2018-12-13 15:25:47 -07:00
Jeremy Soller
4e741f5583
Add redox_fpath function
2018-12-13 14:46:27 -07:00
Jeremy Soller
f7b3abc1b6
Add more wchar definitions
2018-12-13 08:11:49 -07:00
Jeremy Soller
90bf583d28
Better patch for missing M_PI constants
2018-12-09 14:43:23 -07:00
Jeremy Soller
ee40035c4b
Add asprintf
2018-12-09 12:45:04 -07:00
Jeremy Soller
8aae8e1564
Add PTE
...
Add sys_timeb header
2018-12-09 11:27:44 -07:00
Jeremy Soller
950b4526c7
- Disable output of empty header files
...
- Remove incorrect header styles
- Use export.replace where header style was previously needed
- Check compilation of tests using system gcc
2018-11-26 21:35:02 -07:00
Tibor Nagy
55eb8f2779
Implement alloca.h
2018-11-23 21:31:09 +01:00
Jeremy Soller
9790289aec
Add execlp
2018-11-22 20:43:04 -07:00