summaryrefslogtreecommitdiff
path: root/gl/lib/tempname.c.diff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-04-26 15:46:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-04-26 22:10:38 -0700
commitf0b437f3ccebf0a3cc9221359464c838da8ebda6 (patch)
tree0c12d455641630d465cb82ffd2fd0e5d188d76a4 /gl/lib/tempname.c.diff
parent02f678a350f90b4be572486613f186c75d4008ee (diff)
downloadcoreutils-f0b437f3ccebf0a3cc9221359464c838da8ebda6.tar.xz
build: update gnulib submodule to latest
* bootstrap.conf (gnulib_modules): Add file-has-acl. (buildreq): Bump autopoint and gettext to 0.19.4. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4. * gl/lib/tempname.c.diff, gl/lib/tempname.h.diff: Merge recent gnulib changes.
Diffstat (limited to 'gl/lib/tempname.c.diff')
-rw-r--r--gl/lib/tempname.c.diff22
1 files changed, 11 insertions, 11 deletions
diff --git a/gl/lib/tempname.c.diff b/gl/lib/tempname.c.diff
index 459a1e5ee..43858e97e 100644
--- a/gl/lib/tempname.c.diff
+++ b/gl/lib/tempname.c.diff
@@ -1,5 +1,5 @@
diff --git a/lib/tempname.c b/lib/tempname.c
-index 49c7df1..84a45d4 100644
+index 69c572f..1920274 100644
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -20,6 +20,7 @@
@@ -34,9 +34,9 @@ index 49c7df1..84a45d4 100644
int
-__try_tempname (char *tmpl, int suffixlen, void *args,
-- int (*try) (char *, void *))
+- int (*tryfunc) (char *, void *))
+try_tempname_len (char *tmpl, int suffixlen, void *args,
-+ int (*try) (char *, void *), size_t x_suffix_len)
++ int (*tryfunc) (char *, void *), size_t x_suffix_len)
{
- int len;
+ size_t len;
@@ -113,7 +113,7 @@ index 49c7df1..84a45d4 100644
+ for (i = 0; i < x_suffix_len; i++)
+ XXXXXX[i] = letters[randint_genmax (rand_src, sizeof letters - 2)];
- fd = try (tmpl, args);
+ fd = tryfunc (tmpl, args);
if (fd >= 0)
{
__set_errno (save_errno);
@@ -144,7 +144,7 @@ index 49c7df1..84a45d4 100644
}
static int
-@@ -285,9 +291,10 @@ try_nocreate (char *tmpl, void *flags)
+@@ -285,9 +291,10 @@ try_nocreate (char *tmpl, void *flags _GL_UNUSED)
}
/* Generate a temporary file name based on TMPL. TMPL must match the
@@ -157,7 +157,7 @@ index 49c7df1..84a45d4 100644
KIND may be one of:
__GT_NOCREATE: simply verify that the name does not exist
-@@ -298,7 +305,8 @@ try_nocreate (char *tmpl, void *flags)
+@@ -298,7 +305,8 @@ try_nocreate (char *tmpl, void *flags _GL_UNUSED)
We use a clever algorithm to get hard-to-predict names. */
int
@@ -165,14 +165,14 @@ index 49c7df1..84a45d4 100644
+gen_tempname_len (char *tmpl, int suffixlen, int flags, int kind,
+ size_t x_suffix_len)
{
- int (*try) (char *, void *);
+ int (*tryfunc) (char *, void *);
@@ -320,5 +328,18 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
assert (! "invalid KIND in __gen_tempname");
abort ();
}
-- return __try_tempname (tmpl, suffixlen, &flags, try);
-+ return try_tempname_len (tmpl, suffixlen, &flags, try, x_suffix_len);
+- return __try_tempname (tmpl, suffixlen, &flags, tryfunc);
++ return try_tempname_len (tmpl, suffixlen, &flags, tryfunc, x_suffix_len);
+}
+
+int
@@ -183,7 +183,7 @@ index 49c7df1..84a45d4 100644
+
+int
+__try_tempname (char *tmpl, int suffixlen, void *args,
-+ int (*try) (char *, void *))
++ int (*tryfunc) (char *, void *))
+{
-+ return try_tempname_len (tmpl, suffixlen, args, try, 6);
++ return try_tempname_len (tmpl, suffixlen, args, tryfunc, 6);
}