summaryrefslogtreecommitdiff
path: root/lib/setenv.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-11-03 07:44:15 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-11-03 07:44:15 +0000
commit5a5367474b6808f488d4b0e74ba30bebfdc882f3 (patch)
treef52115c051496683e41fd9f7c1f9ad4935e66940 /lib/setenv.h
parent47bcfc54da3d26655f0c151f214a29cf58711765 (diff)
downloadcoreutils-5a5367474b6808f488d4b0e74ba30bebfdc882f3.tar.xz
Sync from gnulib.
Diffstat (limited to 'lib/setenv.h')
-rw-r--r--lib/setenv.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/setenv.h b/lib/setenv.h
index 1c69ac3e4..7ac5ae645 100644
--- a/lib/setenv.h
+++ b/lib/setenv.h
@@ -1,5 +1,5 @@
/* Setting environment variables.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,15 @@ extern int setenv (const char *name, const char *value, int replace);
#endif
-#if !HAVE_UNSETENV
+#if HAVE_UNSETENV
+
+# if VOID_UNSETENV
+/* On some systems, unsetenv() returns void.
+ This is the case for FreeBSD 4.8, NetBSD 1.6, OpenBSD 3.4. */
+# define unsetenv(name) ((unsetenv)(name), 0)
+# endif
+
+#else
/* Remove the variable NAME from the environment. */
extern int unsetenv (const char *name);