diff mbox

Add envz_remove to the libc manual

Message ID 20150518111713.GF15498@spoyarek.pnq.redhat.com
State New
Headers show

Commit Message

Siddhesh Poyarekar May 18, 2015, 11:17 a.m. UTC
On Thu, Mar 19, 2015 at 12:42:29AM +0100, Florian Weimer wrote:
> The safety annotations are incorrect, see envz_add and argz_delete:
> 
> @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
> @c Calls envz_remove, which calls enz_entry and argz_delete, and then
> @c argz_add or equivalent code that reallocs and appends name=value.
> 
> @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
> @c Calls free if no argument is left.

Right, I'll push the following patch with the annotations fixed up.

Siddhesh

	* manual/string.texi (Envz Functions): Add envz_remove.

Comments

Joseph Myers May 19, 2015, 8:31 p.m. UTC | #1
On Mon, 18 May 2015, Siddhesh Poyarekar wrote:

> On Thu, Mar 19, 2015 at 12:42:29AM +0100, Florian Weimer wrote:
> > The safety annotations are incorrect, see envz_add and argz_delete:
> > 
> > @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
> > @c Calls envz_remove, which calls enz_entry and argz_delete, and then
> > @c argz_add or equivalent code that reallocs and appends name=value.
> > 
> > @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
> > @c Calls free if no argument is left.
> 
> Right, I'll push the following patch with the annotations fixed up.
> 
> Siddhesh
> 
> 	* manual/string.texi (Envz Functions): Add envz_remove.

The manual build / install now fails:

/bin/sh ./check-safety.sh intro.texi creature.texi errno.texi memory.texi 
ctype.texi string.texi charset.texi locale.texi message.texi search.texi 
pattern.texi io.texi stdio.texi llio.texi filesys.texi pipe.texi 
socket.texi terminal.texi syslog.texi math.texi arith.texi time.texi 
resource.texi setjmp.texi signal.texi startup.texi getopt.texi argp.texi 
process.texi ipc.texi job.texi nss.texi nsswitch.texi users.texi 
sysinfo.texi conf.texi crypt.texi debug.texi threads.texi probes.texi 
lang.texi header.texi install.texi macros.texi maint.texi platform.texi 
contrib.texi freemanuals.texi lgpl-2.1.texi fdl-1.3.texi
string.texi:2794:@safety{@prelim{}@mtsafe{}@asunsafe{@acsuheap{}}@acunsafe{@acsmem{}}}
grep: write error
string.texi:2794:@safety{@prelim{}@mtsafe{}@asunsafe{@acsuheap{}}@acunsafe{@acsmem{}}}
string.texi:2794:@safety{@prelim{}@mtsafe{}@asunsafe{@acsuheap{}}@acunsafe{@acsmem{}}}
make[2]: *** [/home/jsm28/nobackup/glibc/build-64/manual/stamp-summary] 
Error 1
make[2]: Leaving directory `/home/jsm28/nobackup/glibc/libc/manual'
make[1]: *** [manual/subdir_install] Error 2
make[1]: Leaving directory `/home/jsm28/nobackup/glibc/libc'
make: *** [install] Error 2
diff mbox

Patch

diff --git a/manual/string.texi b/manual/string.texi
index 397c181..c53e73a 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -2788,5 +2788,13 @@  The @code{envz_strip} function removes any null entries from @var{envz},
 updating @code{*@var{envz}} and @code{*@var{envz_len}}.
 @end deftypefun
 
+@comment envz.h
+@comment GNU
+@deftypefun {void} envz_remove (char **@var{envz}, size_t *@var{envz_len}, const char *@var{name})
+@safety{@prelim{}@mtsafe{}@asunsafe{@acsuheap{}}@acunsafe{@acsmem{}}}
+The @code{envz_remove} function removes an entry named @var{name} from
+@var{envz}, updating @code{*@var{envz}} and @code{*@var{envz_len}}.
+@end deftypefun
+
 @c FIXME this are undocumented:
 @c strcasecmp_l @safety{@mtsafe{}@assafe{}@acsafe{}} see strcasecmp