diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-02-03 03:15:10 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-02-03 10:18:28 +0000 |
commit | 658529a10e05d06524d5f591a08f04c04159b4cc (patch) | |
tree | 012a365fb870240694613f6a501ccf34b4080f49 /gl/lib/tempname.c.diff | |
parent | bfb4f5c8b791fdcc3cdba87a5182fc684fa8cd24 (diff) | |
download | coreutils-658529a10e05d06524d5f591a08f04c04159b4cc.tar.xz |
build: fix invalid gnulib patch
* gl/lib/tempname.c.diff: Fix recent breakage so it applies again.
Invalid patch was noticed at http://hydra.nixos.org/eval/1172233
* cfg.mk: Exempt diff files from these "id_est" syntax checks.
(sc_ensure_gl_diffs_apply): A new syntax check, to ensure all
patches under gl/ apply cleanly. Note we use --fuzz=0 to check
patches apply cleanly for safety, due to the patch(1) issue detailed
in commit v8.21-117-g46f7e05
* gl/lib/regcomp.c.diff: Rediffed.
* gl/lib/regex_internal.c.diff: Likewise.
* gl/lib/regex_internal.h.diff: Likewise.
* gl/lib/regexec.c.diff: Likewise.
* gl/lib/tempname.h.diff: Likewise.
Diffstat (limited to 'gl/lib/tempname.c.diff')
-rw-r--r-- | gl/lib/tempname.c.diff | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gl/lib/tempname.c.diff b/gl/lib/tempname.c.diff index 7cf923043..5138df29b 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 26a38ce..5944ee0 100644 +index 088b224..e9a6c0c 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -20,6 +20,7 @@ @@ -18,7 +18,7 @@ index 26a38ce..5944ee0 100644 #include <stddef.h> #include <stdlib.h> #include <string.h> -@@ -175,14 +177,21 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, +@@ -172,14 +174,21 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, } #endif /* _LIBC */ @@ -33,7 +33,7 @@ index 26a38ce..5944ee0 100644 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; /* Generate a temporary file name based on TMPL. TMPL must match the -- rules for mk[s]temp (i.e., end in "XXXXXX", possibly with a suffix). +- rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). + rules for mk[s]temp (i.e., end in at least X_SUFFIX_LEN "X"s, + possibly with a suffix). The name constructed does not exist at the time of the call to @@ -42,7 +42,7 @@ index 26a38ce..5944ee0 100644 KIND may be one of: __GT_NOCREATE: simply verify that the name does not exist -@@ -193,23 +202,24 @@ static const char letters[] = +@@ -190,23 +199,24 @@ static const char letters[] = We use a clever algorithm to get hard-to-predict names. */ int @@ -72,7 +72,7 @@ index 26a38ce..5944ee0 100644 #define ATTEMPTS_MIN (62 * 62 * 62) /* The number of times to attempt to generate a temporary file. To -@@ -221,43 +231,28 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +@@ -218,43 +228,28 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) #endif len = strlen (tmpl); @@ -128,7 +128,7 @@ index 26a38ce..5944ee0 100644 switch (kind) { -@@ -272,7 +267,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +@@ -269,7 +264,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) break; case __GT_NOCREATE: @@ -137,7 +137,7 @@ index 26a38ce..5944ee0 100644 succeeds if __xstat fails because the name does not exist. Note the continue to bypass the common logic at the bottom of the loop. */ -@@ -281,11 +276,15 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +@@ -278,11 +273,15 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) if (errno == ENOENT) { __set_errno (save_errno); @@ -156,7 +156,7 @@ index 26a38ce..5944ee0 100644 } continue; -@@ -297,13 +296,32 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +@@ -294,13 +293,32 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) if (fd >= 0) { __set_errno (save_errno); |