fsetpos: makes the fsetpos function comply with POSIX standard
Build Documentation / build-html (push) Has been cancelled

Change the 'pos' parameter of fsetpos() from 'fpos_t *' to 'const fpos_t *'
in both the prototype and implementation, aligning with POSIX specification
which requires the position parameter to be const-qualified.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2025-09-03 15:35:42 +08:00
committed by Xiang Xiao
parent 98eef560a3
commit 80fcbf7aa8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ int fscanf(FAR FILE *stream, FAR const IPTR char *fmt, ...)
scanf_like(2, 3);
int fseek(FAR FILE *stream, long int offset, int whence);
int fseeko(FAR FILE *stream, off_t offset, int whence);
int fsetpos(FAR FILE *stream, FAR fpos_t *pos);
int fsetpos(FAR FILE *stream, FAR const fpos_t *pos);
long ftell(FAR FILE *stream);
off_t ftello(FAR FILE *stream);
size_t fwrite(FAR const void *ptr, size_t size, size_t n_items,
+1 -1
View File
@@ -53,7 +53,7 @@
*
****************************************************************************/
int fsetpos(FAR FILE *stream, FAR fpos_t *pos)
int fsetpos(FAR FILE *stream, FAR const fpos_t *pos)
{
#ifdef CONFIG_DEBUG_FEATURES
if (!stream || !pos)