summaryrefslogtreecommitdiff
path: root/gl/lib
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-12-11 19:18:04 +0100
committerJim Meyering <meyering@redhat.com>2009-12-11 19:30:59 +0100
commit5a514de955684edeb8b8fc27c9338204dd640109 (patch)
tree929e636ab572baecfdf57737c7ede61098d8284b /gl/lib
parenta0000ba4ae23b770ba0756f0c8cfc59aa9fabbe3 (diff)
downloadcoreutils-5a514de955684edeb8b8fc27c9338204dd640109.tar.xz
build: update gnulib submodule to latest; adapt a patch
* gl/lib/tempname.c.diff: Adjust patch to apply to gnulib, now that most TABs in indentation have been converted to spaces by running this command: f=tempname.c.diff; patch-xform $f > k && mv k $f
Diffstat (limited to 'gl/lib')
-rw-r--r--gl/lib/tempname.c.diff72
1 files changed, 36 insertions, 36 deletions
diff --git a/gl/lib/tempname.c.diff b/gl/lib/tempname.c.diff
index 8ffc50692..1bf111963 100644
--- a/gl/lib/tempname.c.diff
+++ b/gl/lib/tempname.c.diff
@@ -127,48 +127,48 @@ index 2da5afe..562955a 100644
+ XXXXXX[i] = letters[randint_genmax (rand_src, sizeof letters - 2)];
switch (kind)
- {
+ {
@@ -276,7 +271,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
- break;
-
- case __GT_NOCREATE:
-- /* This case is backward from the other three. __gen_tempname
-+ /* This case is backward from the other three. This function
- succeeds if __xstat fails because the name does not exist.
- Note the continue to bypass the common logic at the bottom
- of the loop. */
+ break;
+
+ case __GT_NOCREATE:
+- /* This case is backward from the other three. __gen_tempname
++ /* This case is backward from the other three. This function
+ succeeds if __xstat fails because the name does not exist.
+ Note the continue to bypass the common logic at the bottom
+ of the loop. */
@@ -285,11 +280,15 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
- if (errno == ENOENT)
- {
- __set_errno (save_errno);
-- return 0;
-+ fd = 0;
-+ goto done;
- }
- else
-- /* Give up now. */
-- return -1;
-+ {
-+ /* Give up now. */
-+ fd = -1;
-+ goto done;
-+ }
- }
- continue;
+ if (errno == ENOENT)
+ {
+ __set_errno (save_errno);
+- return 0;
++ fd = 0;
++ goto done;
+ }
+ else
+- /* Give up now. */
+- return -1;
++ {
++ /* Give up now. */
++ fd = -1;
++ goto done;
++ }
+ }
+ continue;
@@ -301,13 +300,32 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
if (fd >= 0)
- {
- __set_errno (save_errno);
-- return fd;
-+ goto done;
- }
+ {
+ __set_errno (save_errno);
+- return fd;
++ goto done;
+ }
else if (errno != EEXIST)
-- return -1;
-+ {
-+ fd = -1;
-+ goto done;
-+ }
+- return -1;
++ {
++ fd = -1;
++ goto done;
++ }
}
+ randint_all_free (rand_src);