Mercurial > hg > octave-kai > gnulib-hg
changeset 17318:087501e891d9
tmpdir: use secure_getenv
* lib/tmpdir.c (__secure_getenv) [!LIBC]:
Define to secure_getenv, not getenv.
* m4/tmpdir.m4 (gt_TMPDIR): Don't check for __secure_getenv,
as that's now secure_getenv's job.
* modules/tmpdir (Depends-on): Add secure_getenv.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 04 Feb 2013 20:34:17 -0800 |
parents | e67939626bf8 |
children | f6f7069a0d8e |
files | ChangeLog lib/tmpdir.c m4/tmpdir.m4 modules/tmpdir |
diffstat | 4 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2013-02-04 Paul Eggert <eggert@cs.ucla.edu> + tmpdir: use secure_getenv + * lib/tmpdir.c (__secure_getenv) [!LIBC]: + Define to secure_getenv, not getenv. + * m4/tmpdir.m4 (gt_TMPDIR): Don't check for __secure_getenv, + as that's now secure_getenv's job. + * modules/tmpdir (Depends-on): Add secure_getenv. + tempname: use secure_getenv * lib/tempname.c (__secure_getenv) [!_LIBC]: Define to secure_getenv, not getenv.
--- a/lib/tmpdir.c +++ b/lib/tmpdir.c @@ -53,13 +53,10 @@ # define struct_stat64 struct stat64 #else # define struct_stat64 struct stat +# define __secure_getenv secure_getenv # define __xstat64(version, path, buf) stat (path, buf) #endif -#if ! (HAVE___SECURE_GETENV || _LIBC) -# define __secure_getenv getenv -#endif - /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. */
--- a/m4/tmpdir.m4 +++ b/m4/tmpdir.m4 @@ -1,4 +1,4 @@ -# tmpdir.m4 serial 3 +# tmpdir.m4 serial 4 dnl Copyright (C) 2001-2002, 2006, 2009-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,4 @@ # Prerequisites for lib/tmpdir.c -AC_DEFUN([gt_TMPDIR], -[ - AC_CHECK_FUNCS([__secure_getenv]) -]) +AC_DEFUN([gt_TMPDIR], [:])