From 859900e6053bfb4735f76edd555ca024d65e235a Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 11 Jul 2006 17:05:48 +0000 Subject: [PATCH] add/use SIGAR_64BIT macro and include powerpc64 --- bindings/java/src/jni/javasigar.c | 2 +- include/sigar_private.h | 4 ++++ src/os/linux/linux_sigar.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bindings/java/src/jni/javasigar.c b/bindings/java/src/jni/javasigar.c index d29647e8..6d53a099 100644 --- a/bindings/java/src/jni/javasigar.c +++ b/bindings/java/src/jni/javasigar.c @@ -20,7 +20,7 @@ #include "javasigar_generated.h" #include "javasigar.h" -#if defined(__osf__) || defined(__LP64__) +#ifdef SIGAR_64BIT #define SIGAR_POINTER_LONG #endif diff --git a/include/sigar_private.h b/include/sigar_private.h index 68768148..31a5b807 100644 --- a/include/sigar_private.h +++ b/include/sigar_private.h @@ -1,6 +1,10 @@ #ifndef SIGAR_PRIVATE_DOT_H #define SIGAR_PRIVATE_DOT_H +#if defined(__LP64__) || defined(__powerpc64__) || defined(__osf__) +#define SIGAR_64BIT +#endif + #include "sigar_log.h" #include diff --git a/src/os/linux/linux_sigar.c b/src/os/linux/linux_sigar.c index 965fc293..a5edf3ee 100644 --- a/src/os/linux/linux_sigar.c +++ b/src/os/linux/linux_sigar.c @@ -1573,7 +1573,7 @@ static SIGAR_INLINE unsigned int hex2int(const char *x, int len) #define HEX_ENT_LEN 8 -#ifdef __LP64__ +#ifdef SIGAR_64BIT #define ROUTE_FMT "%16s %128s %128s %X %ld %ld %ld %128s %ld %ld %ld\n" #else #define ROUTE_FMT "%16s %128s %128s %X %lld %lld %lld %128s %lld %lld %lld\n"