[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:22 UTC 2009
The following commit has been merged in the upstream branch:
commit 699b1531a30933ab9a2bb82e8001911a1bb304a6
Author: Clint Adams <schizo at debian.org>
Date: Wed Nov 21 14:45:16 2007 +0000
Apply patch from Andrew Benham to handle platforms without setenv() and unsetenv(). closes: #452224.
git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-142
diff --git a/Makefile.am b/Makefile.am
index e835ba5..af395ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,8 +7,8 @@ libcommunicate_la_SOURCES = communicate.c
lib_LTLIBRARIES=libfakeroot.la
libfakeroot_la_SOURCES=libfakeroot.c statconv/glibc/linux/alpha/stats.h wrapdef.h wrapstruct.h communicate.h
libfakeroot_la_LDFLAGS=-release 0
-libfakeroot_la_DEPENDENCIES=wrapdef.h wrapstruct.h libcommunicate.la
-libfakeroot_la_LIBADD = libcommunicate.la
+libfakeroot_la_DEPENDENCIES=wrapdef.h wrapstruct.h libcommunicate.la $(LTLIBOBJS)
+libfakeroot_la_LIBADD = libcommunicate.la $(LTLIBOBJS)
bin_PROGRAMS=faked
faked_SOURCES = faked.c
diff --git a/configure.ac b/configure.ac
index 7fbc74b..67a5ca3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -408,6 +408,9 @@ AC_SUBST(LDEXTRAVAR)
dnl Checks for library functions.
AC_CHECK_FUNCS(strdup strstr getresuid setresuid getresgid setresgid setfsuid setfsgid)
+AC_CHECK_DECLS([setenv, unsetenv])
+AC_REPLACE_FUNCS([setenv unsetenv])
+
dnl kludge
AH_VERBATIM([WRAP_STAT],
[/* Stuff. */
diff --git a/libfakeroot.c b/libfakeroot.c
index 4557316..0d296ab 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -58,6 +58,14 @@
#include <dirent.h>
#include <errno.h>
+#if !HAVE_DECL_SETENV
+extern int setenv (const char *name, const char *value, int replace);
+#endif
+#if !HAVE_DECL_UNSETENV
+extern int unsetenv (const char *name);
+#endif
+
+
/*
Where are those shared libraries?
If I knew of a configure/libtool way to find that out, I'd use it. Or
--
fakeroot
More information about the Fakeroot-commits
mailing list