]> Savannah Git Hosting - gnulib.git/commitdiff
tmpdir: use secure_getenv
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Feb 2013 04:34:17 +0000 (20:34 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Feb 2013 04:35:32 +0000 (20:35 -0800)
* 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.

ChangeLog
lib/tmpdir.c
m4/tmpdir.m4
modules/tmpdir

index 6639a186d9c446003824bdc8e9eb8b13fae99211..4b046d3b963b36a458385389e9a82fe47ecff9f6 100644 (file)
--- 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.
index 6eb6d84b1fa290743707110d20a43fa1a0f3fc72..e8044162c038265f92d0a5171c277ba304900441 100644 (file)
 # 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.
  */
index 083c0bbf480e222f36286db6a843561e7df6c2e3..6dd5f7099469f19e3ae25f096f37e49142417cc4 100644 (file)
@@ -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 @@ dnl with or without modifications, as long as this notice is preserved.
 
 # Prerequisites for lib/tmpdir.c
 
-AC_DEFUN([gt_TMPDIR],
-[
-  AC_CHECK_FUNCS([__secure_getenv])
-])
+AC_DEFUN([gt_TMPDIR], [:])
index 0dd1780fdaf1c41ac2f22a377d38c3aa20cc4467..31fb104f3f61c52e12f42da763240afc58a468c3 100644 (file)
@@ -7,6 +7,7 @@ lib/tmpdir.c
 m4/tmpdir.m4
 
 Depends-on:
+secure_getenv
 stdbool
 sys_stat
 pathmax
@@ -25,4 +26,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
-