diff --git a/lib/roken/roken.h b/lib/roken/roken.h index fcc343bbb..cd2a1333a 100644 --- a/lib/roken/roken.h +++ b/lib/roken/roken.h @@ -14,6 +14,10 @@ int putenv(const char *string); int setenv(const char *var, const char *val, int rewrite); #endif +#ifndef HAVE_UNSETENV +void unsetenv(const char *name); +#endif + #ifndef HAVE_GETUSERSHELL char *getusershell(void); #endif @@ -43,6 +47,10 @@ char *strerror(int eno); char *hstrerror(int herr); #endif +#ifndef HAVE_HERROR +void herror(char *s); +#endif + #ifndef HAVE_INET_ATON /* Minimal implementation of inet_aton. Doesn't handle hex numbers. */ #ifndef __GNUC__ @@ -54,4 +62,12 @@ int inet_aton(char *cp, struct in_addr *adr); char* getcwd(char *path, int size); #endif +#ifndef HAVE_GETENT +int getent(char *cp, char *name); +#endif + +#ifndef HAVE_GETSTR +char *getstr(char *id, char **cpp); +#endif + #endif /* __ROKEN_H__ */ diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index fcc343bbb..cd2a1333a 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -14,6 +14,10 @@ int putenv(const char *string); int setenv(const char *var, const char *val, int rewrite); #endif +#ifndef HAVE_UNSETENV +void unsetenv(const char *name); +#endif + #ifndef HAVE_GETUSERSHELL char *getusershell(void); #endif @@ -43,6 +47,10 @@ char *strerror(int eno); char *hstrerror(int herr); #endif +#ifndef HAVE_HERROR +void herror(char *s); +#endif + #ifndef HAVE_INET_ATON /* Minimal implementation of inet_aton. Doesn't handle hex numbers. */ #ifndef __GNUC__ @@ -54,4 +62,12 @@ int inet_aton(char *cp, struct in_addr *adr); char* getcwd(char *path, int size); #endif +#ifndef HAVE_GETENT +int getent(char *cp, char *name); +#endif + +#ifndef HAVE_GETSTR +char *getstr(char *id, char **cpp); +#endif + #endif /* __ROKEN_H__ */ diff --git a/lib/roken/unsetenv.c b/lib/roken/unsetenv.c index bcf7966e5..685aefc72 100644 --- a/lib/roken/unsetenv.c +++ b/lib/roken/unsetenv.c @@ -2,10 +2,13 @@ #include #endif -#include - RCSID("$Id$"); +#include +#include + +#include "roken.h" + extern char **environ; /*