summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-05-04 16:37:41 +0000
committerStew Benedict <stewb@mandriva.org>2001-05-04 16:37:41 +0000
commitc8707292b05edebfddd22328c44d63279040dae0 (patch)
treef87237dbe700ce59b8979b341a47808497873197 /perl-install/c
parent59b4f44effc1651c0b6cd67d477449931817aedb (diff)
downloaddrakx-c8707292b05edebfddd22328c44d63279040dae0.tar
drakx-c8707292b05edebfddd22328c44d63279040dae0.tar.gz
drakx-c8707292b05edebfddd22328c44d63279040dae0.tar.bz2
drakx-c8707292b05edebfddd22328c44d63279040dae0.tar.xz
drakx-c8707292b05edebfddd22328c44d63279040dae0.zip
force XF4 in expert too for PPC, don't run xmodmap, PPC SMP routine placeholder
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/smp.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/perl-install/c/smp.c b/perl-install/c/smp.c
index 34303759e..b885de850 100644
--- a/perl-install/c/smp.c
+++ b/perl-install/c/smp.c
@@ -64,6 +64,34 @@ int sparcDetectSMP(void)
}
#endif /* __sparc__ */
+/* just a placeholder for now - don't have an SMP machine
+ need something in place to build - s.benedict */
+
+#ifdef __powerpc__
+int ppcDetectSMP(void)
+{
+ int issmp = 0;
+ FILE *f;
+
+ f = fopen("/proc/cpuinfo", "r");
+ if (f) {
+ char buff[1024];
+
+ while (fgets (buff, 1024, f) != NULL) {
+ if (!strncmp (buff, "ncpus active\t: ", 15)) {
+ if (strtoul (buff + 15, NULL, 0) > 1)
+ issmp = 1;
+ break;
+ }
+ }
+ fclose(f);
+ } else
+ return -1;
+
+ return issmp;
+}
+#endif /* __powerpc__ */
+
#ifdef __i386__
/*
* Copyright (c) 1996, by Steve Passe
@@ -458,6 +486,8 @@ int detectSMP(void)
return isSMP = sparcDetectSMP();
#elif __alpha__
return isSMP = alphaDetectSMP();
+#elif __powerpc__
+ return isSMP = ppcDetectSMP();
#elif __ia64__
return isSMP = 1;
#else