Browse Source

dpkg: Rename arch variable to native_arch

This disambiguates the usage and avoids unneeded shadowing.
Guillem Jover 15 years ago
parent
commit
c484754584
4 changed files with 5 additions and 5 deletions
  1. 1 1
      src/enquiry.c
  2. 1 1
      src/main.c
  3. 1 1
      src/main.h
  4. 2 2
      src/processarc.c

+ 1 - 1
src/enquiry.c

@@ -431,7 +431,7 @@ void printarch(const char *const *argv) {
   if (*argv)
   if (*argv)
     badusage(_("--%s takes no arguments"), cipaction->olong);
     badusage(_("--%s takes no arguments"), cipaction->olong);
 
 
-  printf("%s\n", arch);
+  printf("%s\n", native_arch);
 
 
   m_output(stdout, _("<standard output>"));
   m_output(stdout, _("<standard output>"));
 }
 }

+ 1 - 1
src/main.c

@@ -166,7 +166,7 @@ usage(const struct cmdinfo *ci, const char *value)
 }
 }
 
 
 const char thisname[]= "dpkg";
 const char thisname[]= "dpkg";
-const char arch[] = ARCHITECTURE;
+const char native_arch[] = ARCHITECTURE;
 const char printforhelp[]= N_(
 const char printforhelp[]= N_(
 "Type dpkg --help for help about installing and deinstalling packages [*];\n"
 "Type dpkg --help for help about installing and deinstalling packages [*];\n"
 "Use `dselect' or `aptitude' for user-friendly package management;\n"
 "Use `dselect' or `aptitude' for user-friendly package management;\n"

+ 1 - 1
src/main.h

@@ -139,7 +139,7 @@ extern int errabort;
 extern const char *admindir;
 extern const char *admindir;
 extern const char *instdir;
 extern const char *instdir;
 extern struct pkg_list *ignoredependss;
 extern struct pkg_list *ignoredependss;
-extern const char arch[];
+extern const char native_arch[];
 
 
 struct invoke_hook {
 struct invoke_hook {
 	struct invoke_hook *next;
 	struct invoke_hook *next;

+ 2 - 2
src/processarc.c

@@ -284,10 +284,10 @@ void process_archive(const char *filename) {
 
 
   if (pkg->available.arch && *pkg->available.arch &&
   if (pkg->available.arch && *pkg->available.arch &&
       strcmp(pkg->available.arch, "all") &&
       strcmp(pkg->available.arch, "all") &&
-      strcmp(pkg->available.arch, arch))
+      strcmp(pkg->available.arch, native_arch))
     forcibleerr(fc_architecture,
     forcibleerr(fc_architecture,
                 _("package architecture (%s) does not match system (%s)"),
                 _("package architecture (%s) does not match system (%s)"),
-                pkg->available.arch, arch);
+                pkg->available.arch, native_arch);
 
 
   for (deconpil= deconfigure;
   for (deconpil= deconfigure;
        deconpil;
        deconpil;