diff options
author | Eric Blake <ebb9@byu.net> | 2009-11-03 08:51:31 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-11-05 07:00:52 -0700 |
commit | d431c61873753673ad9fcbac90db6db04185e307 (patch) | |
tree | d567528063998de7dd5d5fac3abd30c88da8dfed /src | |
parent | 5f29d118df9ad888f7c56de153966c16139c8f25 (diff) | |
download | coreutils-d431c61873753673ad9fcbac90db6db04185e307.tar.xz |
build: reflect gnulib changes to tempname
In glibc 2.11 and gnulib, gen_tempname added a parameter
suffixlen (unfortunately, it is typed as int rather than
size_t, for historical compatibility to a poor choice by BSD).
* gnulib: Import latest changes.
* gl/lib/tempname.h.diff: Accommodate new suffixlen parameter.
* gl/lib/tempname.c.diff (check_x_suffix): Allow for X in suffix
beyond x_suffix_len.
(gen_tempname_len): Add suffixlen parameter.
(__gen_tempname): Update caller.
* src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers.
Diffstat (limited to 'src')
-rw-r--r-- | src/mktemp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mktemp.c b/src/mktemp.c index e967d8eca..6cf40b001 100644 --- a/src/mktemp.c +++ b/src/mktemp.c @@ -110,13 +110,15 @@ count_trailing_X_s (const char *s) static int mkstemp_len (char *tmpl, size_t suff_len, bool dry_run) { - return gen_tempname_len (tmpl, 0, dry_run ? GT_NOCREATE : GT_FILE, suff_len); + return gen_tempname_len (tmpl, 0, 0, dry_run ? GT_NOCREATE : GT_FILE, + suff_len); } static int mkdtemp_len (char *tmpl, size_t suff_len, bool dry_run) { - return gen_tempname_len (tmpl, 0, dry_run ? GT_NOCREATE : GT_DIR, suff_len); + return gen_tempname_len (tmpl, 0, 0, dry_run ? GT_NOCREATE : GT_DIR, + suff_len); } int |