summaryrefslogtreecommitdiff
path: root/archival/dpkg.c
diff options
context:
space:
mode:
authorEric Andersen2001-04-05 03:14:39 +0000
committerEric Andersen2001-04-05 03:14:39 +0000
commite76c3b08e105147e3cef7e8d38d65da2fac6b2e1 (patch)
tree87f705b9e4e4e48700ac61e9538c637ae2b395a7 /archival/dpkg.c
parent3c0364f3911ec9f43e1c8c96ec2c8e30b1b52c47 (diff)
downloadbusybox-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.zip
busybox-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.tar.gz
A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can handle them sanely and all at once. -Erik
Diffstat (limited to 'archival/dpkg.c')
-rw-r--r--archival/dpkg.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index d650817..dc0b23e 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -12,14 +12,6 @@
#include "busybox.h"
-/* Stupid libc doesn't have a reliable way for use to know
- * that libc5 is being used. Assume this is good enough */
-#if !defined __GLIBC__ && !defined __UCLIBC__
-#error It looks like you are using libc5, which does not support
-#error tfind(). tfind() is used by busybox dpkg.
-#error Please disable BB_DPKG. Sorry.
-#endif
-
#define DEPENDSMAX 64 /* maximum number of depends we can handle */
/* Should we do full dependency checking? */
@@ -591,6 +583,7 @@ static int dpkg_dounpack(package_t *pkg)
char *adminscripts[] = { "/prerm", "/postrm", "/preinst", "/postinst",
"/conffiles", "/md5sums", "/shlibs", "/templates" };
char buf[1024], buf2[1024];
+ FILE *myfile = stdout;
DPRINTF("Unpacking %s\n", pkg->package);
@@ -622,9 +615,9 @@ static int dpkg_dounpack(package_t *pkg)
strcpy(lst_file, infodir);
strcat(lst_file, pkg->package);
strcat(lst_file, ".list");
- outfp = freopen(lst_file, "w", stdout);
+ outfp = freopen(lst_file, "w", myfile);
deb_extract(dpkg_deb_list, NULL, pkg->file);
- stdout = freopen(NULL, "w", outfp);
+ myfile = freopen(NULL, "w", outfp);
printf("done\n");
getchar();