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
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
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
Jeremy Soller
434cad49ce
Add sysconf
2019-01-13 14:16:51 -07:00
Jeremy Soller
bd956e5fe4
Force little endian for reals
2019-01-01 07:35:13 -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
4e741f5583
Add redox_fpath function
2018-12-13 14:46:27 -07:00
Jeremy Soller
44f84f406f
Force byte order to little endian, for gcc
2018-11-17 09:19:35 -07:00
Tibor Nagy
0f5fa8c9d4
Move regoff_t to regex.h
2018-10-09 16:43:34 +02:00
jD91mZM2
1acc2a1a32
Initial regex.h implementation
2018-10-05 18:07:43 +02:00
Jeremy Soller
c25ce6a5f3
Include stddef.h in sys/types.h
2018-08-18 08:27:40 -06:00
jD91mZM2
f6b364845e
Implement pwd.h
2018-07-27 15:15:56 +02:00
jD91mZM2
ecd8aca6d6
Basic signal support
2018-07-22 17:04:13 +02:00
jD91mZM2
d3f6985ee9
Add a few things necessary for openssl (not all)
2018-07-08 08:44:23 +02:00
Paul Sajna
c7e9ec8ae2
fix
2018-03-26 16:47:12 -07:00
Paul Sajna
bc98f6a029
git rm include/sys/stat.h
2018-03-11 11:22:10 -07: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
Paul Sajna
799c8828c2
mkdir and rmdir
2018-03-08 19:45:16 -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
a9aae80ae0
WIP: Define common types
2018-03-03 10:08:16 -07:00