summaryrefslogtreecommitdiffstats
path: root/gl/unsetenv.c
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 21:27:12 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 21:27:12 (GMT)
commit26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch)
treec4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/unsetenv.c
parent5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff)
downloadmonitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/unsetenv.c')
-rw-r--r--gl/unsetenv.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gl/unsetenv.c b/gl/unsetenv.c
index 65a19cc..c58c82f 100644
--- a/gl/unsetenv.c
+++ b/gl/unsetenv.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 1992, 1995-2002, 2005-2010 Free Software Foundation, Inc. 1/* Copyright (C) 1992, 1995-2002, 2005-2013 Free Software Foundation, Inc.
2 This file is part of the GNU C Library. 2 This file is part of the GNU C Library.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This program is free software: you can redistribute it and/or modify
@@ -14,12 +14,12 @@
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 16
17#include <config.h>
18
19/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc 17/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
20 optimizes away the name == NULL test below. */ 18 optimizes away the name == NULL test below. */
21#define _GL_ARG_NONNULL(params) 19#define _GL_ARG_NONNULL(params)
22 20
21#include <config.h>
22
23/* Specification. */ 23/* Specification. */
24#include <stdlib.h> 24#include <stdlib.h>
25 25
@@ -36,7 +36,7 @@
36#endif 36#endif
37 37
38#if _LIBC 38#if _LIBC
39/* This lock protects against simultaneous modifications of `environ'. */ 39/* This lock protects against simultaneous modifications of 'environ'. */
40# include <bits/libc-lock.h> 40# include <bits/libc-lock.h>
41__libc_lock_define_initialized (static, envlock) 41__libc_lock_define_initialized (static, envlock)
42# define LOCK __libc_lock_lock (envlock) 42# define LOCK __libc_lock_lock (envlock)
@@ -97,6 +97,13 @@ weak_alias (__unsetenv, unsetenv)
97#else /* HAVE_UNSETENV */ 97#else /* HAVE_UNSETENV */
98 98
99# undef unsetenv 99# undef unsetenv
100# if !HAVE_DECL_UNSETENV
101# if VOID_UNSETENV
102extern void unsetenv (const char *);
103# else
104extern int unsetenv (const char *);
105# endif
106# endif
100 107
101/* Call the underlying unsetenv, in case there is hidden bookkeeping 108/* Call the underlying unsetenv, in case there is hidden bookkeeping
102 that needs updating beyond just modifying environ. */ 109 that needs updating beyond just modifying environ. */