diff options
author | Tom Yu <tlyu@mit.edu> | 2001-04-04 02:31:56 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2001-04-04 02:31:56 +0000 |
commit | 715a67e80b96feda5c585533be1d54298fc318ed (patch) | |
tree | ee162e1509f805cce82a9e275b7622a113ebd5f6 /src | |
parent | ec7ce052a7a42bb5eca40e8b002fa3cd0e2f8c01 (diff) | |
download | krb5-715a67e80b96feda5c585533be1d54298fc318ed.tar.gz krb5-715a67e80b96feda5c585533be1d54298fc318ed.tar.xz krb5-715a67e80b96feda5c585533be1d54298fc318ed.zip |
* setenv.c: Add conditionals for compilation of setenv, unsetenv,
and getenv such that they only get compiled if they don't already
exist. [pullup from krb5-1-2-2-branch]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13142 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/clients/ksu/ChangeLog | 6 | ||||
-rw-r--r-- | src/clients/ksu/setenv.c | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/clients/ksu/ChangeLog b/src/clients/ksu/ChangeLog index 2cf085124..0772244a1 100644 --- a/src/clients/ksu/ChangeLog +++ b/src/clients/ksu/ChangeLog @@ -1,3 +1,9 @@ +2001-04-03 Tom Yu <tlyu@mit.edu> + + * setenv.c: Add conditionals for compilation of setenv, unsetenv, + and getenv such that they only get compiled if they don't already + exist. [pullup from krb5-1-2-2-branch] + 2000-10-17 Ezra Peisach <epeisach@mit.edu> * krb_auth_su.c (krb5_get_tkt_via_passwd): Argument to diff --git a/src/clients/ksu/setenv.c b/src/clients/ksu/setenv.c index 96d4a1e9e..2633a9d11 100644 --- a/src/clients/ksu/setenv.c +++ b/src/clients/ksu/setenv.c @@ -25,6 +25,7 @@ * Set the value of the environmental variable "name" to be * "value". If rewrite is set, replace any current value. */ +#ifndef HAVE_SETENV setenv(name, value, rewrite) register char *name, *value; int rewrite; @@ -77,11 +78,13 @@ setenv(name, value, rewrite) for (*C++ = '='; *C++ = *value++;); return(0); } +#endif /* * unsetenv(name) -- * Delete environmental variable "name". */ +#ifndef HAVE_UNSETENV void unsetenv(name) char *name; @@ -96,6 +99,7 @@ unsetenv(name) if (!(*P = *(P + 1))) break; } +#endif /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. @@ -119,6 +123,7 @@ unsetenv(name) * getenv -- * Returns ptr to value associated with name, if any, else NULL. */ +#ifndef HAVE_GETENV char * getenv(name) char *name; @@ -128,6 +133,7 @@ getenv(name) return(_findenv(name, &offset)); } +#endif /* * _findenv -- @@ -136,9 +142,8 @@ getenv(name) * environmental array, for use by setenv(3) and unsetenv(3). * Explicitly removes '=' in argument name. * - * This routine *should* be a static; don't use it. */ -char * +static char * _findenv(name, offset) register char *name; int *offset; |