Commit graph

14 commits

Author SHA1 Message Date
Andreas Kling
f2a087126c LibC: Add posix_openpt(), grantpt() and unlockpt()
This makes getting a pseudoterminal pair a little bit more portable.
Note that grantpt() and unlockpt() are currently no-ops, since we've
already granted the pseudoterminal slave to the calling user.

We also accept O_CLOEXEC to posix_openpt(), unlike some systems. :^)
2020-02-05 21:17:41 +01:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
9d681beaf0 LibC: Oops x2, we can't use "bool" in stdlib.h either 2019-12-26 10:30:34 +01:00
Andreas Kling
b1fc5d9143 LibC: Oops, we can't use [[nodiscard]] when this is included from C 2019-12-26 10:24:37 +01:00
Shannon Booth
f6bd4f8691 LibC: Use shared functon to generate unique filenames
Move some dupliated code into __generate_unique_filename()
2019-12-26 10:05:59 +01:00
Andreas Kling
196b64c0ae LibC: Move realpath() to <stdlib.h> 2019-11-16 17:29:09 +01:00
Brandon Scott
bda36853c9 LibC: Implemented mkstemp in stdlib
Implemented mkstemp method in stdlib.
2019-11-16 12:50:50 +01:00
Emanuel Sprung
e7affa24dc LibC, LibM: Add functions needed to compile python3 2019-11-11 22:04:16 +01:00
Calvin Buckley
aa42f56210 LibC: add arc4random* using new getrandom syscall
Serenity is really not production ready; I shouldn't have to warn
you not to trust the RNG here. This is for compatibility with
software expecting the interface.

arc4random does expose an annoying flaw with the syscall I want
to discuss with Kling though.
2019-10-13 18:03:21 +02:00
Calvin Buckley
ef40ebbe6d LibC: Add some wchar functions
These are basically copy and pasted from the regular string version.
Also add some more multi-byte/wide conversion stub.

libarchive wanted these. There's a lot more, but we can add them
one at a time.
2019-10-13 08:44:47 +02:00
Sergey Bugaev
b4389ca4b0 LibC: Add a missing mbstowcs() declaration
This ensures it gets a C linkage, and so fixes the binutils build.
2019-10-09 15:06:25 +02:00
Sergey Bugaev
89bf38864a LibC: Misc additions 2019-10-03 08:18:05 +02:00
Mauri de Souza Nunes
2d24b12a34 LibC: Implement mkdtemp library function 2019-09-14 12:05:50 +02:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Renamed from LibC/stdlib.h (Browse further)