mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibC: Minor changes to make nasm work
* Added some missing macros to headers * Stubbed strftime() time function to not assert * Added "rt" mode to fopen(), working just like "r" or "rb"
This commit is contained in:
parent
aba6e6de6a
commit
c2a8c4cedd
Notes:
sideshowbarker
2024-07-19 11:18:34 +09:00
Author: https://github.com/Mcpg 🔰
Commit: c2a8c4cedd
Pull-request: https://github.com/SerenityOS/serenity/pull/744
5 changed files with 20 additions and 3 deletions
|
@ -437,7 +437,9 @@ void perror(const char* s)
|
|||
FILE* fopen(const char* pathname, const char* mode)
|
||||
{
|
||||
int flags = 0;
|
||||
if (!strcmp(mode, "r") || !strcmp(mode, "rb"))
|
||||
// NOTE: rt is a non-standard mode which opens a file for read, explicitly
|
||||
// specifying that it's a text file
|
||||
if (!strcmp(mode, "r") || !strcmp(mode, "rb") || !strcmp(mode, "rt"))
|
||||
flags = O_RDONLY;
|
||||
else if (!strcmp(mode, "r+") || !strcmp(mode, "rb+"))
|
||||
flags = O_RDWR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue