| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* lib/tempname.c, lib/tempname.h: Remove incorrect comment,
as the names are not necessarily hard to predict (Bug#57129).
|
| |
|
|
|
|
|
| |
* lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
says so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, merge in Gnulib’s more-recent methods of making it easier
to share between Gnulib and glibc, and fix a few randomness
glitches.
* lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC.
(__set_errno): Remove; libc-config.h does that for us.
Do not include <sys/time.h>.
(__secure_getenv) [_LIBC]: New macro.
(__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros.
(RANDOM_BITS): Rewrite.
(RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros.
(random_value): New typedef.
(try_file, try_dir, try_nocreate): Move up.
(gen_tempname_len, try_tempname_len): New functions.
(gen_tempname_len): Use a constant array rather than a switch.
(try_tempname_len): Don’t assume string length fits in int.
Generalize use of RANDOM_BITS. If _LIBC, don’t assume RANDOM_BITS
has enough entropy (it’s a bit short).
(__gen_tempname): Rewrite in terms of gen_tempname_len.
(__try_tempname): Rewrite in terms of try_tempname_len.
* lib/tempname.h (gen_tempname_len, try_tempname_len): New decls.
* modules/tempname (Depends-on): Remove gettimeofday, sys_time.
Add getentropy, libc-config.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
| |
* lib/tempname.h [C++]: Specify extern "C" linkage.
* lib/tempname.h (try_tempname):
* lib/tempname.c (__try_tempname, __gen_tempname):
Rename 'try' to 'tryfunc'.
|
|
|
|
|
|
|
|
|
|
| |
Recent changes to the tempname module, introduced
whitespace inconsistencies that are triggering
issues in coreutils diffs generated against the new files.
* lib/tempname.c: Normalize spacing and line length.
* lib/tempname.h: Likewise.
* modules/tempname: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way how gen_tempname() creates files is not always sufficient. For example,
it may make sense to create directories when creating the temporary file or
directory fails with errno set to ENOENT. Add a try_tempname() variant of
gen_tempname() that allows that. Implement gen_tempname() on top of it.
* lib/tempname.c (try_tempname): New function and backend of gen_tempname().
(try_file, try_dir, try_nocreate): Callbacks to use for the different kinds
that gen_tempname supports (GT_FILE, GT_DIR, GT_NOCREATE).
* lib/tempname.h (try_tempname): Declare here.
* modules/tempname: Mention try_tempname.
|
|
|
|
|
|
| |
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
| |
I ran 'make update-copyright'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
| |
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/tempname.c (__gen_tempname): Add suffixlen argument. Use
same values for __GT_FILE as glibc. Abort even when assertions
are disabled.
* lib/tempname.h (GT_FILE): Use glibc __GT_FILE, if available, and
match its value otherwise. Allow idempotent inclusion.
* lib/mkdtemp.c (mkdtemp): Adjust caller.
* lib/mkostemp.c (mkostemp): Likewise.
* lib/mkstemp.c (mkstemp): Likewise.
* lib/tmpfile.c (tmpfile): Likewise.
* NEWS: Document this.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
| |
|
|
* modules/mkstemp (Depends-on): Add tempname, and drop transitive
dependencies.
(Files): Move lib/tempname.c...
* modules/tempname: ...to this new module.
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
(gl_PREREQ_TEMPNAME): Move...
* m4/tempname.m4: ...to this new file.
* lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
* modules/sys_stat (Depends-on): Add stat-macros.
* lib/stat_.h (includes): Pick up stat macros.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
if stat macros are broken.
* lib/tempname.c (includes): No need to include "stat-macros.h".
(__gen_tempname) [!_LIBC]: Expose as gen_tempname.
(direxists, __path_search) [!_LIBC]: Don't compile these in
gnulib; the tmpdir module covers that.
* lib/tempname.h: New file.
|