posix.cfg: Added support for getline() and getdelim().

This commit is contained in:
orbitcowboy 2022-05-04 20:35:01 +02:00
parent 7c816425b9
commit 907dcddd3b
1 changed files with 46 additions and 1 deletions

View File

@ -4862,6 +4862,46 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/> <leak-ignore/>
<warn severity="portability">Non reentrant function 'getlogin' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getlogin_r'.</warn> <warn severity="portability">Non reentrant function 'getlogin' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getlogin_r'.</warn>
</function> </function>
<!-- https://man7.org/linux/man-pages/man3/getline.3.html -->
<!-- ssize_t getline(char **lineptr, size_t *n, FILE *stream); -->
<function name="getline">
<returnValue type="ssize_t"/>
<noreturn>false</noreturn>
<leak-ignore/>
<!-- If *lineptr is set to NULL before the call, then getline() will
allocate a buffer for storing the line. This buffer should be
freed by the user program even if getline() failed.-->
<arg nr="1" direction="out"/>
<arg nr="2" direction="inout">
<not-null/>
</arg>
<arg nr="3" direction="in">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/getline.3.html -->
<!-- ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); -->
<function name="getdelim">
<returnValue type="ssize_t"/>
<noreturn>false</noreturn>
<leak-ignore/>
<!-- If *lineptr is set to NULL before the call, then getdelim() will
allocate a buffer for storing the line. This buffer should be
freed by the user program even if getdelim() failed.-->
<arg nr="1" direction="out"/>
<arg nr="2" direction="inout">
<not-null/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<valid>0:255</valid>
</arg>
<arg nr="4" direction="in">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/getlogin.3.html --> <!-- https://man7.org/linux/man-pages/man3/getlogin.3.html -->
<!-- int getlogin_r(char *buf, size_t bufsize); --> <!-- int getlogin_r(char *buf, size_t bufsize); -->
<function name="getlogin_r"> <function name="getlogin_r">
@ -5861,7 +5901,12 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<alloc init="true">strndup</alloc> <alloc init="true">strndup</alloc>
<alloc init="true">wcsdup</alloc> <alloc init="true">wcsdup</alloc>
<dealloc>free</dealloc> <dealloc>free</dealloc>
</memory> </memory>
<memory>
<alloc init="true" arg="1">getline</alloc>
<alloc init="true" arg="1">getdelim</alloc>
<dealloc>free</dealloc>
</memory>
<memory> <memory>
<alloc init="true">mmap</alloc> <alloc init="true">mmap</alloc>
<alloc init="true">mmap64</alloc> <alloc init="true">mmap64</alloc>