env-util.c revision 3768e5f626cac81f7f2703ffb6bb9c10efe8e882
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "env-util.h"
#include <stdlib.h>
struct env_backup {
const char **strings;
};
{
2048);
}
}
void env_remove(const char *name)
{
#ifdef HAVE_UNSETENV
#else
extern char **environ;
unsigned int len;
char **envp;
do {
break;
}
}
#endif
}
void env_clean(void)
{
#ifdef HAVE_CLEARENV
if (clearenv() < 0)
i_fatal("clearenv() failed");
#else
extern char **environ;
/* Try to clear the environment.
a) environ = NULL crashes on OS X.
b) *environ = NULL doesn't work on FreeBSD 7.0.
c) environ = emptyenv doesn't work on Haiku OS
d) environ = calloc() should work everywhere
*/
#endif
}
struct env_backup *env_backup_save(void)
{
struct env_backup *env;
extern char **environ;
unsigned int i, count;
for (i = 0; i < count; i++)
return env;
}
{
unsigned int i;
env_clean();
}
{
}
void env_deinit(void)
{
}