From: root Date: Thu, 28 Mar 1996 22:52:06 +0000 (+0000) Subject: added a few osfmach* archs X-Git-Tag: tznext/4.11.0.1.tizen20130304~11476 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e3b53f7afb02c5aac2373bb48287e4a37bd6b93;p=tools%2Flibrpm-tizen.git added a few osfmach* archs fail immediately on unknown arch/os CVS patchset: 484 CVS date: 1996/03/28 22:52:06 --- diff --git a/lib/misc.c b/lib/misc.c index ca8980b..8e387f4 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "misc.h" @@ -99,7 +100,8 @@ static void init_arch_os(void) } uname(&un); - if ((!strcmp(un.machine, "i986")) || + if ((!strcmp(un.machine, "osfmach3_i386 machine")) || + (!strcmp(un.machine, "i986")) || (!strcmp(un.machine, "i886")) || (!strcmp(un.machine, "i786")) || (!strcmp(un.machine, "i686")) || @@ -114,15 +116,25 @@ static void init_arch_os(void) } else if (!strcmp(un.machine, "sparc")) { archnum = 3; archname = "sparc"; + } else if ((!strcmp(un.machine, "osfmach3_ppc")) || + (!strcmp(un.machine, "ppc"))) { + archnum = 5; + archname = "ppc"; } else { - /* XXX unknown arch - how should we handle this? */ + /* unknown arch */ + fprintf(stderr, "Unknown arch: %s\n", un.machine); + fprintf(stderr, "Please contact bugs@redhat.com\n"); + exit(1); } if (!strcmp(un.sysname, "Linux")) { osnum = 1; osname = "Linux"; } else { - /* XXX unknown os - how should we handle this? */ + /* unknown os */ + fprintf(stderr, "Unknown OS: %s\n", un.sysname); + fprintf(stderr, "Please contact bugs@redhat.com\n"); + exit(1); } }