[PATCH 1/2] Extend __gen_tempname with mode argument

Mike Frysinger vapier at gentoo.org
Sat Nov 7 22:25:22 UTC 2009


On Saturday 07 November 2009 15:33:15 Mikhail Gusarov wrote:
>  		if (__path_search(buf, L_tmpnam, NULL, NULL, 0) != 0
> -		 || __gen_tempname(buf, __GT_NOCREATE) != 0
> +		 || __gen_tempname(buf, __GT_NOCREATE, 0) != 0
>  		) {
> ...
> -extern int __gen_tempname (char *__tmpl, int __kind) attribute_hidden;
> +extern int __gen_tempname (char *__tmpl, int __kind, mode_t mode)

can you do a file size comparison between this and a varags approach ?  if 
kind == __GT_NOCREATE, the mode will always be 0.  if it isnt, you can use 
varargs to rip it off the stack.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20091107/eef18ac2/attachment.pgp>


More information about the uClibc mailing list