Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdio/file: fix numerous issues in the fread/fwrite functions #376

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions include/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ extern int fgetpos(FILE *stream, fpos_t *pos);

/* Opens the filename pointed to by filename using the given mode. */
extern FILE *fopen(const char *filename, const char *mode);
extern FILE *fopen_unlocked(const char *filename, const char *mode);


/* Associates a stream with existing file descriptor fd. */
Expand All @@ -146,9 +145,7 @@ extern int fileno_unlocked(FILE *stream);
* to seek from the given whence position.
*/
extern int fseek(FILE *stream, long int offset, int whence);
extern int fseek_unlocked(FILE *stream, long int offset, int whence);
extern int fseeko(FILE *stream, off_t offset, int whence);
extern int fseeko_unlocked(FILE *stream, off_t offset, int whence);


/*
Expand All @@ -160,9 +157,7 @@ extern int fsetpos(FILE *stream, const fpos_t *pos);

/* Returns the current file position of the given stream. */
extern long int ftell(FILE *stream);
extern long int ftell_unlocked(FILE *stream);
extern off_t ftello(FILE *stream);
extern off_t ftello_unlocked(FILE *stream);


/* Writes data from the array pointed to by ptr to the given stream. */
Expand Down Expand Up @@ -349,7 +344,6 @@ extern int puts(const char *str);

/* Pushes the character char (an unsigned char) onto the specified stream so that the next character is read. */
extern int ungetc(int c, FILE *stream);
extern int ungetc_unlocked(int c, FILE *stream);


/* Prints a descriptive error message to stderr. First the string str is printed followed by a colon and then a space. */
Expand Down
Loading
Loading