forked from enlightenment/efl
clearenv not on bsd - dont build the related test code (yes tests may
fail). SVN revision: 56550
This commit is contained in:
parent
b0531e0d36
commit
debf4d9428
|
@ -5,3 +5,7 @@
|
|||
2011-01-29 Brian Mattern
|
||||
|
||||
Fix bug when you have an empty <Name></Name> in a menu
|
||||
|
||||
2011-01-30 Carsten Haitzler (The Rasterman)
|
||||
|
||||
Fix tests to not build clearenv related code if not available
|
||||
|
|
|
@ -217,7 +217,7 @@ AC_SUBST(lt_enable_auto_import)
|
|||
### Checks for library functions
|
||||
AC_ISC_POSIX
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(strlcpy)
|
||||
AC_CHECK_FUNCS(strlcpy clearenv)
|
||||
|
||||
### Unit tests, coverage
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "Efreet.h"
|
||||
#include "Efreet_Mime.h"
|
||||
#include "config.h"
|
||||
#include <Ecore.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -83,12 +84,12 @@ environment_store(void)
|
|||
{
|
||||
char *env;
|
||||
char **e;
|
||||
|
||||
#ifdef HAVE_CLEARENV
|
||||
EINA_LIST_FREE(environment, env)
|
||||
free(env);
|
||||
|
||||
for (e = environ; *e; e++)
|
||||
environment = eina_list_append(environment, strdup(*e));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -97,10 +98,11 @@ environment_restore(void)
|
|||
Eina_List *l;
|
||||
char *e;
|
||||
if (!environment) return;
|
||||
|
||||
#ifdef HAVE_CLEARENV
|
||||
clearenv();
|
||||
EINA_LIST_FOREACH(environment, l, e)
|
||||
putenv(e);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue