Hi guys, while building the suite on ia64 I found out that _syscall0 is not available on all Linux supported arched and as far as i understood the overall _syscall$magicnumber will disappear. Jeff in CC can probably give a much more detailed explanation if needed. Adam in CC cooked up a patch (in attachment) to make the code portable. The patch is against RHEL4U1 branch. Thanks Fabio -- no signature file found.
diff -u rhcluster-1.20050527/debian/control rhcluster-1.20050527/debian/control --- rhcluster-1.20050527/debian/control +++ rhcluster-1.20050527/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Fabio M. Di Nitto <fabbione@xxxxxxxxxx> Standards-Version: 3.6.1 -Build-Depends: debhelper (>= 4.2.28), gcc-3.4 (>= 3.4.4-0ubuntu4), libxml2-dev, libncurses5-dev, libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-ppc64 [powerpc] +Build-Depends: debhelper (>= 4.2.28), gcc-3.4 (>= 3.4.4-0ubuntu3), libxml2-dev, libncurses5-dev, libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-ppc64 [powerpc] Package: rhcluster Section: admin diff -u rhcluster-1.20050527/debian/changelog rhcluster-1.20050527/debian/changelog --- rhcluster-1.20050527/debian/changelog +++ rhcluster-1.20050527/debian/changelog @@ -1,3 +1,10 @@ +rhcluster (1.20050527-0ubuntu1.adam) breezy; urgency=low + + * Replace _syscall magic numbers with syscall() calls that will work + on all arches. Magic numbers are bad, mmkay? + + -- Adam Conrad <adconrad@xxxxxxxxxx> Fri, 10 Jun 2005 04:34:17 +0000 + rhcluster (1.20050527-0ubuntu1) breezy; urgency=low * First package release. only in patch2: unchanged: --- rhcluster-1.20050527.orig/magma-plugins/gulm/gulm.c +++ rhcluster-1.20050527/magma-plugins/gulm/gulm.c @@ -34,8 +34,17 @@ #include <sys/types.h> #include <linux/unistd.h> -static _syscall0(pid_t, gettid) -static pid_t gettid(void); +#ifdef __NR_gettid +static pid_t gettid (void) +{ + return syscall(__NR_gettid); +} +#else +static pid_t gettid (void) +{ + return -ENOSYS; +} +#endif #define MODULE_DESCRIPTION "GuLM Plugin v1.0" #define MODULE_AUTHOR "Lon Hohberger" only in patch2: unchanged: --- rhcluster-1.20050527.orig/rgmanager/src/clulib/gettid.c +++ rhcluster-1.20050527/rgmanager/src/clulib/gettid.c @@ -1,6 +1,17 @@ #include <sys/types.h> +#include <unistd.h> #include <linux/unistd.h> #include <gettid.h> #include <errno.h> -_syscall0(pid_t,gettid) +#ifdef __NR_gettid +pid_t gettid (void) +{ + return syscall(__NR_gettid); +} +#else +pid_t gettid (void) +{ + return -ENOSYS; +} +#endif
Attachment:
signature.asc
Description: OpenPGP digital signature
-- Linux-cluster@xxxxxxxxxx http://www.redhat.com/mailman/listinfo/linux-cluster