summaryrefslogtreecommitdiff
path: root/openbsd-compat/setenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/setenv.c')
-rw-r--r--openbsd-compat/setenv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/openbsd-compat/setenv.c b/openbsd-compat/setenv.c
index b7ba0ce83..c3a86c651 100644
--- a/openbsd-compat/setenv.c
+++ b/openbsd-compat/setenv.c
@@ -30,7 +30,7 @@
30 */ 30 */
31 31
32#include "includes.h" 32#include "includes.h"
33#ifndef HAVE_SETENV 33#if !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV)
34 34
35#if defined(LIBC_SCCS) && !defined(lint) 35#if defined(LIBC_SCCS) && !defined(lint)
36static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $"; 36static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $";
@@ -77,6 +77,7 @@ __findenv(name, offset)
77 return (NULL); 77 return (NULL);
78} 78}
79 79
80#ifndef HAVE_SETENV
80/* 81/*
81 * setenv -- 82 * setenv --
82 * Set the value of the environmental variable "name" to be 83 * Set the value of the environmental variable "name" to be
@@ -138,7 +139,9 @@ setenv(name, value, rewrite)
138 ; 139 ;
139 return (0); 140 return (0);
140} 141}
142#endif /* HAVE_SETENV */
141 143
144#ifndef HAVE_UNSETENV
142/* 145/*
143 * unsetenv(name) -- 146 * unsetenv(name) --
144 * Delete environmental variable "name". 147 * Delete environmental variable "name".
@@ -157,5 +160,6 @@ unsetenv(name)
157 if (!(*P = *(P + 1))) 160 if (!(*P = *(P + 1)))
158 break; 161 break;
159} 162}
163#endif /* HAVE_UNSETENV */
160 164
161#endif /* HAVE_SETENV */ 165#endif /* !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV) */