The following commit has been merged in the master branch:
commit c48475458415335c8969a11cea22ba87045c2cf3
Author: Guillem Jover <[email protected]>
Date:   Mon Jan 31 07:24:50 2011 +0100

    dpkg: Rename arch variable to native_arch
    
    This disambiguates the usage and avoids unneeded shadowing.

diff --git a/src/enquiry.c b/src/enquiry.c
index 3ea523d..5f2573e 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -431,7 +431,7 @@ void printarch(const char *const *argv) {
   if (*argv)
     badusage(_("--%s takes no arguments"), cipaction->olong);
 
-  printf("%s\n", arch);
+  printf("%s\n", native_arch);
 
   m_output(stdout, _("<standard output>"));
 }
diff --git a/src/main.c b/src/main.c
index cfefa3b..3fa3c78 100644
--- a/src/main.c
+++ b/src/main.c
@@ -166,7 +166,7 @@ usage(const struct cmdinfo *ci, const char *value)
 }
 
 const char thisname[]= "dpkg";
-const char arch[] = ARCHITECTURE;
+const char native_arch[] = ARCHITECTURE;
 const char printforhelp[]= N_(
 "Type dpkg --help for help about installing and deinstalling packages [*];\n"
 "Use `dselect' or `aptitude' for user-friendly package management;\n"
diff --git a/src/main.h b/src/main.h
index 89244b2..1316ba1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -139,7 +139,7 @@ extern int errabort;
 extern const char *admindir;
 extern const char *instdir;
 extern struct pkg_list *ignoredependss;
-extern const char arch[];
+extern const char native_arch[];
 
 struct invoke_hook {
        struct invoke_hook *next;
diff --git a/src/processarc.c b/src/processarc.c
index 8dbd497..c642bc2 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -284,10 +284,10 @@ void process_archive(const char *filename) {
 
   if (pkg->available.arch && *pkg->available.arch &&
       strcmp(pkg->available.arch, "all") &&
-      strcmp(pkg->available.arch, arch))
+      strcmp(pkg->available.arch, native_arch))
     forcibleerr(fc_architecture,
                 _("package architecture (%s) does not match system (%s)"),
-                pkg->available.arch, arch);
+                pkg->available.arch, native_arch);
 
   for (deconpil= deconfigure;
        deconpil;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to